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:
@@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
|
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -10,7 +10,7 @@ import { SearchPage } from 'src/app/pages/search/search.page';
|
|||||||
})
|
})
|
||||||
export class AddNotePage implements OnInit {
|
export class AddNotePage implements OnInit {
|
||||||
note: string = '';
|
note: string = '';
|
||||||
documents: SearchDocument[] = [];
|
documents: SearchList[] = [];
|
||||||
loadedAttachments:any;
|
loadedAttachments:any;
|
||||||
hideThisFeature: boolean = true;
|
hideThisFeature: boolean = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { NewEventPage } from 'src/app/pages/agenda/new-event/new-event.page';
|
import { NewEventPage } from 'src/app/pages/agenda/new-event/new-event.page';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
import { AlertService } from 'src/app/services/alert.service';
|
||||||
@@ -14,7 +14,7 @@ import { environment } from 'src/environments/environment';
|
|||||||
})
|
})
|
||||||
export class ChatOptionsFeaturesPage implements OnInit {
|
export class ChatOptionsFeaturesPage implements OnInit {
|
||||||
|
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
members: any;
|
members: any;
|
||||||
attendees: EventPerson[] = [];
|
attendees: EventPerson[] = [];
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { AuthService } from 'src/app/services/auth.service';
|
|||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { User } from 'src/app/models/user.model';
|
import { User } from 'src/app/models/user.model';
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
@@ -78,7 +78,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
emptyTextDescription = "Sem intervenientes selecionados";
|
emptyTextDescription = "Sem intervenientes selecionados";
|
||||||
showEmptyContainer = true;
|
showEmptyContainer = true;
|
||||||
|
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
|
|
||||||
loggeduser: User;
|
loggeduser: User;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
|
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
@@ -14,7 +14,7 @@ export class DarParecerPage implements OnInit {
|
|||||||
note:string;
|
note:string;
|
||||||
serialNumber:string;
|
serialNumber:string;
|
||||||
instanceId: string;
|
instanceId: string;
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
|
|||||||
import { AlertService } from 'src/app/services/alert.service';
|
import { AlertService } from 'src/app/services/alert.service';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -39,7 +39,7 @@ export class DelegarPage implements OnInit {
|
|||||||
showAttendees= false;
|
showAttendees= false;
|
||||||
|
|
||||||
hideThisFeature: boolean = true;
|
hideThisFeature: boolean = true;
|
||||||
documents: SearchDocument[] = [];
|
documents: SearchList[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
|||||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||||
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
|
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
|
||||||
import { FromSearchDocument, SearchFolder } from 'src/app/models/search-document';
|
import { SearchDocumentDetails, SearchFolderDetails } from 'src/app/models/search-document';
|
||||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||||
import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-document-options/searched-document-options.page';
|
import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-document-options/searched-document-options.page';
|
||||||
@@ -26,10 +26,10 @@ export class DocumentDetailPage implements OnInit {
|
|||||||
applicationId:string;
|
applicationId:string;
|
||||||
LoadedDocument:any = null;
|
LoadedDocument:any = null;
|
||||||
|
|
||||||
folder: SearchFolder
|
folder: SearchFolderDetails
|
||||||
document: FromSearchDocument
|
document: SearchDocumentDetails
|
||||||
|
|
||||||
task: any = {}
|
task: ExpedientTaskModalPageNavParamsTask;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
@@ -61,8 +61,8 @@ export class DocumentDetailPage implements OnInit {
|
|||||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||||
|
|
||||||
let task: ExpedientTaskModalPageNavParamsTask
|
let task: ExpedientTaskModalPageNavParamsTask
|
||||||
let document: FromSearchDocument = this.LoadedDocument
|
let document: SearchDocumentDetails = this.LoadedDocument
|
||||||
let folder: SearchFolder = this.LoadedDocument
|
let folder: SearchFolderDetails = this.LoadedDocument
|
||||||
|
|
||||||
if(this.LoadedDocument.ApplicationID == 361 || this.LoadedDocument.ApplicationId == 361) {
|
if(this.LoadedDocument.ApplicationID == 361 || this.LoadedDocument.ApplicationId == 361) {
|
||||||
task = {
|
task = {
|
||||||
@@ -160,7 +160,7 @@ export class DocumentDetailPage implements OnInit {
|
|||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: DocumentSetUpMeetingPage,
|
component: DocumentSetUpMeetingPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
task: this.task,
|
subject: this.task.workflowInstanceDataFields.Subject,
|
||||||
document: this.LoadedDocument,
|
document: this.LoadedDocument,
|
||||||
},
|
},
|
||||||
cssClass: classs,
|
cssClass: classs,
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
|
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
|
||||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
placeholder="Início*"
|
placeholder="Início*"
|
||||||
[formControl]="dateControlStart"
|
[(ngModel)]="postData.StartDate"
|
||||||
[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>
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
<mat-form-field appearance="none" class="date-hour-picker width-100 d-none d-md-block">
|
<mat-form-field appearance="none" class="date-hour-picker width-100 d-none d-md-block">
|
||||||
<input matInput [ngxMatDatetimePicker]="fim"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Fim*"
|
placeholder="Fim*"
|
||||||
[formControl]="dateControlEnd"
|
[(ngModel)]="postData.EndDate"
|
||||||
[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>
|
||||||
|
|||||||
@@ -2,10 +2,9 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { ModalController, NavParams } from '@ionic/angular';
|
import { ModalController, NavParams } from '@ionic/angular';
|
||||||
import { Event } from 'src/app/models/event.model'
|
import { Event } from 'src/app/models/event.model'
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchDocumentDetails, SearchFolderDetails, SearchFolderDetailsDocuments, SearchList } from 'src/app/models/search-document';
|
||||||
import { User } from 'src/app/models/user.model';
|
import { User } from 'src/app/models/user.model';
|
||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
@@ -15,14 +14,11 @@ import * as _moment from 'moment';
|
|||||||
import * as _rollupMoment from 'moment';
|
import * as _rollupMoment from 'moment';
|
||||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||||
import { NGX_MAT_DATE_FORMATS } 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';
|
|
||||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
|
||||||
import { DocumentService } from 'src/app/Rules/document.service';
|
import { DocumentService } from 'src/app/Rules/document.service';
|
||||||
import { DocumentSetUpMeeting, Attachments } from 'src/app/models/CallMeeting';
|
import { DocumentSetUpMeeting } from 'src/app/models/CallMeeting';
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
import { EventsService } from 'src/app/services/events.service';
|
||||||
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
|
import { EventService } from 'src/app/services/rules/event.service';
|
||||||
|
import { EventPipe } from 'src/app/pipes/event.pipe';
|
||||||
const moment = _rollupMoment || _moment;
|
|
||||||
|
|
||||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
parse: {
|
parse: {
|
||||||
@@ -58,9 +54,6 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
public stepMinute = 5;
|
public stepMinute = 5;
|
||||||
public stepSecond = 5;
|
public stepSecond = 5;
|
||||||
|
|
||||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
|
||||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
|
||||||
|
|
||||||
p: any = {}
|
p: any = {}
|
||||||
|
|
||||||
Form: FormGroup;
|
Form: FormGroup;
|
||||||
@@ -68,42 +61,21 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
recurringTypes = [];
|
recurringTypes = [];
|
||||||
Occurrence: Date = new Date()
|
Occurrence: Date = new Date()
|
||||||
EventRecurrenceType = '-1'
|
EventRecurrenceType = '-1'
|
||||||
|
|
||||||
showLoader = false
|
showLoader = false
|
||||||
|
|
||||||
get dateStart () {
|
|
||||||
if( window.innerWidth < 801) {
|
|
||||||
return this.postData.StartDate;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
return this.dateControlStart.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get dateEnd () {
|
|
||||||
if( window.innerWidth < 801) {
|
|
||||||
return this.postData.EndDate;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
return this.dateControlEnd.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ViewChild('picker') picker: any;
|
@ViewChild('picker') picker: any;
|
||||||
@ViewChild('fim') fim: any;
|
@ViewChild('fim') fim: any;
|
||||||
@ViewChild('inicio') inicio: any;
|
@ViewChild('inicio') inicio: any;
|
||||||
@ViewChild('picker1') picker1: any;
|
@ViewChild('picker1') picker1: any;
|
||||||
|
|
||||||
task: any;
|
|
||||||
|
|
||||||
taskParticipants: EventPerson[] = [];
|
taskParticipants: EventPerson[] = [];
|
||||||
taskParticipantsCc: EventPerson[] = [];
|
taskParticipantsCc: EventPerson[] = [];
|
||||||
|
|
||||||
taskDocId:string;
|
taskDocId:string;
|
||||||
loadedAttachments:any;
|
loadedAttachments:any;
|
||||||
documents: SearchDocument[] = [];
|
|
||||||
|
|
||||||
attachments:SearchDocument[] = [];
|
attachments: SearchList[] = [];
|
||||||
|
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
@@ -114,29 +86,30 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
loggeduser: User;
|
loggeduser: User;
|
||||||
emptyTextDescription = "Sem intervenientes selecionados";
|
emptyTextDescription = "Sem intervenientes selecionados";
|
||||||
|
|
||||||
document: any;
|
document: SearchFolderDetails | SearchDocumentDetails | any;
|
||||||
|
subject: string
|
||||||
|
|
||||||
private searchDocumentPipe = SearchDocumentPipe
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private router:Router,
|
private router:Router,
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
private processes:ProcessesService,
|
|
||||||
authService: AuthService,
|
authService: AuthService,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private documentService: DocumentService,
|
private documentService: DocumentService,
|
||||||
private calendarService: EventsService,
|
private calendarService: EventsService,
|
||||||
|
private eventService: EventService,
|
||||||
|
private eventPipe: EventPipe
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
this.task = this.navParams.get('task');
|
|
||||||
this.document = this.navParams.get('document')
|
this.document = this.navParams.get('document')
|
||||||
|
this.subject = this.navParams.get('subject')
|
||||||
|
|
||||||
this.postData = new Event();
|
this.postData = new Event();
|
||||||
this.postData.Body ={ BodyType : "1", Text : ""};
|
this.postData.Body ={ BodyType : "1", Text : ""};
|
||||||
|
|
||||||
this.postData.Subject = this.task.workflowInstanceDataFields.Subject;
|
this.postData.Subject = this.subject
|
||||||
this.postData.CalendarName = "Oficial";
|
this.postData.CalendarName = "Oficial";
|
||||||
|
|
||||||
this.postData.Category = 'Reunião'
|
this.postData.Category = 'Reunião'
|
||||||
@@ -144,7 +117,6 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.adding = "intervenient";
|
this.adding = "intervenient";
|
||||||
console.log(this.task);
|
|
||||||
this.setDefaultTime()
|
this.setDefaultTime()
|
||||||
this.getRecurrenceTypes();
|
this.getRecurrenceTypes();
|
||||||
}
|
}
|
||||||
@@ -164,22 +136,10 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
this.modalController.dismiss(null);
|
this.modalController.dismiss(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
goBack() {
|
|
||||||
this.modalController.dismiss(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
runValidation() {
|
runValidation() {
|
||||||
this.validateFrom = true
|
this.validateFrom = true
|
||||||
}
|
}
|
||||||
|
|
||||||
get dateValid() {
|
|
||||||
if (window.innerWidth <= 800) {
|
|
||||||
return this.postData.StartDate < this.postData.EndDate? ['ok']: []
|
|
||||||
} else {
|
|
||||||
return ['ok']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
injectValidation() {
|
injectValidation() {
|
||||||
|
|
||||||
this.Form = new FormGroup({
|
this.Form = new FormGroup({
|
||||||
@@ -193,7 +153,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
CalendarName: new FormControl(this.postData.CalendarName, [
|
CalendarName: new FormControl(this.postData.CalendarName, [
|
||||||
// Validators.required
|
// Validators.required
|
||||||
]),
|
]),
|
||||||
Date: new FormControl(this.dateValid, [
|
Date: new FormControl( (this.postData.StartDate < this.postData.EndDate), [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
participantes: new FormControl(this.taskParticipants, [
|
participantes: new FormControl(this.taskParticipants, [
|
||||||
@@ -216,68 +176,80 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
|
|
||||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||||
|
|
||||||
let data: DocumentSetUpMeeting = {
|
var Attachments: addAttachment[] = []
|
||||||
EventProcess: {
|
let folder: SearchFolderDetails = this.document
|
||||||
Body: this.postData.Body.Text,
|
let document: SearchDocumentDetails = this.document
|
||||||
Location: this.postData.Location,
|
|
||||||
StartDate: this.dateStart,
|
|
||||||
EndDate: this.dateEnd,
|
|
||||||
EventType: 'Reunião',
|
|
||||||
ParticipantsList: Attendees,
|
|
||||||
Subject: this.postData.Subject,
|
|
||||||
IsRecurring: this.postData.IsRecurring,
|
|
||||||
Message: this.postData.Subject,
|
|
||||||
IsAllDayEvent: this.postData.IsRecurring,
|
|
||||||
EventRecurrence: {
|
|
||||||
Type: this.EventRecurrenceType,
|
|
||||||
LastOccurrence: this.Occurrence
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
Attachments: []
|
if(folder.Documents) {
|
||||||
}
|
this.document.Documents.forEach( (_folder: SearchFolderDetailsDocuments) => {
|
||||||
|
Attachments.push({
|
||||||
if(this.document.Documents) {
|
|
||||||
this.document.Documents.forEach( (ele) => {
|
|
||||||
console.log(ele)
|
|
||||||
data.Attachments.push({
|
|
||||||
ApplicationId: 361,
|
ApplicationId: 361,
|
||||||
Source: 1,
|
Source: 1,
|
||||||
SourceId: ele.docID || ele.docId || ele.DocId,
|
SourceId: _folder['docID'] || _folder['docId'] || _folder.DocId,
|
||||||
SourceName: ele.Assunto
|
SourceTitle: _folder.Assunto,
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
data.Attachments.push({
|
Attachments.push({
|
||||||
ApplicationId: 8,
|
ApplicationId: 8,
|
||||||
Source: 1,
|
Source: 1,
|
||||||
SourceId: this.document.docID || this.document.docId || this.document.DocId,
|
SourceId: document['docID'] || document['docId'] || document.DocId,
|
||||||
SourceName: this.document.Assunto
|
SourceTitle: document.Assunto
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.attachments.forEach((e)=> {
|
this.attachments.forEach((e)=> {
|
||||||
console.log('e', e)
|
Attachments.push({
|
||||||
data.Attachments.push({
|
|
||||||
ApplicationId: e.ApplicationType,
|
ApplicationId: e.ApplicationType,
|
||||||
Source: 1,
|
Source: 1,
|
||||||
SourceId: e.Id,
|
SourceId: e.Id,
|
||||||
SourceName: e.Assunto
|
SourceTitle: e.Assunto
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const loader = this.toastService.loading()
|
|
||||||
|
|
||||||
try {
|
let postEvent = {
|
||||||
await this.documentService.setUpMeeting(data).toPromise()
|
EventId: '',
|
||||||
this.toastService.successMessage('Processo criado')
|
Subject: this.postData.Subject,
|
||||||
this.close()
|
Body: this.postData.Body.Text,
|
||||||
} catch(e) {
|
Location: this.postData.Location,
|
||||||
this.toastService.badRequest("Processo não criado")
|
CalendarId: this.postData.CalendarName,
|
||||||
} finally {
|
CalendarName: this.postData.CalendarName,
|
||||||
loader.remove()
|
StartDate: this.postData.StartDate,
|
||||||
|
EndDate: this.postData.EndDate,
|
||||||
|
EventType: 'Reunião',
|
||||||
|
Attendees: Attendees,
|
||||||
|
IsMeeting: false, //
|
||||||
|
IsRecurring: this.postData.IsRecurring,
|
||||||
|
AppointmentState: 0, //
|
||||||
|
TimeZone: '', //
|
||||||
|
Organizer: '', //
|
||||||
|
Category: 'Reunião',
|
||||||
|
HasAttachments: false,
|
||||||
|
EventRecurrence: {
|
||||||
|
Type: this.EventRecurrenceType,
|
||||||
|
LastOccurrence: this.Occurrence
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.eventService.create({
|
||||||
|
body: postEvent,
|
||||||
|
calendar: this.postData.CalendarName
|
||||||
|
}).subscribe(async (respose) => {
|
||||||
|
|
||||||
|
const res: any = respose;
|
||||||
|
const eventId: string = res
|
||||||
|
|
||||||
|
const DocumentToSave = this.attachments.map((e) => {
|
||||||
|
return this.eventPipe.AttactSearchResult(e, eventId, {})
|
||||||
|
});
|
||||||
|
|
||||||
|
await DocumentToSave.forEach(async (attachments, i) => {
|
||||||
|
await this.eventService.addAttachment(attachments).toPromise();
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async addParticipants() {
|
async addParticipants() {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { AlertService } from 'src/app/services/alert.service';
|
|||||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ export class ForwardPage implements OnInit {
|
|||||||
formLocationSatus: boolean = false;
|
formLocationSatus: boolean = false;
|
||||||
showAttendees= false;
|
showAttendees= false;
|
||||||
|
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ export class DocumentSetUpMeeting {
|
|||||||
"Body": string,
|
"Body": string,
|
||||||
"Location": string,
|
"Location": string,
|
||||||
"Subject": string,
|
"Subject": string,
|
||||||
"StartDate"?: string,
|
"StartDate"?: string | Date,
|
||||||
"EndDate"?: string,
|
"EndDate"?: string | Date,
|
||||||
"ReviewUserComment"?: string,
|
"ReviewUserComment"?: string,
|
||||||
"MDName"?: string,
|
"MDName"?: string,
|
||||||
"MDEmail"?: string,
|
"MDEmail"?: string,
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
interface addAttachment {
|
||||||
|
SourceTitle: string;
|
||||||
|
ParentId?: string;
|
||||||
|
Source: any;
|
||||||
|
SourceId: any;
|
||||||
|
ApplicationId: any;
|
||||||
|
Id?: any;
|
||||||
|
Link?: any;
|
||||||
|
SerialNumber?: any
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export class SearchDocument {
|
export class SearchList {
|
||||||
ApplicationType: number | string;
|
ApplicationType: number | string;
|
||||||
Assunto: string;
|
Assunto: string;
|
||||||
Data: string;
|
Data: string;
|
||||||
@@ -7,6 +7,7 @@ export class SearchDocument {
|
|||||||
EntidadeOrganicaNome: string;
|
EntidadeOrganicaNome: string;
|
||||||
Id: string;
|
Id: string;
|
||||||
appName?: string;
|
appName?: string;
|
||||||
|
ApplicationName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Attachments {
|
export class Attachments {
|
||||||
@@ -18,7 +19,7 @@ export class Attachments {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// details
|
// details
|
||||||
export class FromSearchDocument {
|
export class SearchDocumentDetails {
|
||||||
ApplicationId: number
|
ApplicationId: number
|
||||||
ApplicationID: number
|
ApplicationID: number
|
||||||
Assunto: string
|
Assunto: string
|
||||||
@@ -28,21 +29,17 @@ export class FromSearchDocument {
|
|||||||
SenderId: number
|
SenderId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// details
|
// details
|
||||||
export class SearchFolder {
|
export class SearchFolderDetails {
|
||||||
ApplicationID: number
|
ApplicationID: number
|
||||||
ApplicationId: number
|
ApplicationId: number
|
||||||
Assunto:string
|
Assunto:string
|
||||||
DateDispatch: string
|
DateDispatch: string
|
||||||
DispatchNumber: string
|
DispatchNumber: string
|
||||||
Docs: string
|
Docs: string
|
||||||
Documents: {
|
Documents: SearchFolderDetailsDocuments[]
|
||||||
Assunto: string
|
|
||||||
DocDate: string
|
|
||||||
DocId: number
|
|
||||||
DocNumber: string
|
|
||||||
Sender: string
|
|
||||||
}[]
|
|
||||||
DocumentsTotal: 2
|
DocumentsTotal: 2
|
||||||
IntervenerList: string[]
|
IntervenerList: string[]
|
||||||
Interveners: string
|
Interveners: string
|
||||||
@@ -52,3 +49,23 @@ export class SearchFolder {
|
|||||||
Status: string
|
Status: string
|
||||||
folderId: number
|
folderId: number
|
||||||
}
|
}
|
||||||
|
export class SearchFolderDetailsDocuments {
|
||||||
|
Assunto: string
|
||||||
|
DocDate: string
|
||||||
|
DocId: number
|
||||||
|
DocNumber: string
|
||||||
|
Sender: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SearchCategory {
|
||||||
|
SecFsId?: any;
|
||||||
|
Id: number;
|
||||||
|
Name: string;
|
||||||
|
Qtd: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface searchResult {
|
||||||
|
Categories: SearchCategory[];
|
||||||
|
Documents: SearchList[];
|
||||||
|
Total: number;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { AnimationController, ModalController, NavParams } from '@ionic/angular'
|
|||||||
import { EventAttachment } from 'src/app/models/attachment.model';
|
import { EventAttachment } from 'src/app/models/attachment.model';
|
||||||
import { EventBody } from 'src/app/models/eventbody.model';
|
import { EventBody } from 'src/app/models/eventbody.model';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { User } from 'src/app/models/user.model';
|
import { User } from 'src/app/models/user.model';
|
||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
@@ -56,7 +56,7 @@ export class NewEventPage implements OnInit {
|
|||||||
taskParticipants: any = [];
|
taskParticipants: any = [];
|
||||||
taskParticipantsCc: any = [];
|
taskParticipantsCc: any = [];
|
||||||
|
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
|
|
||||||
loggeduser: User;
|
loggeduser: User;
|
||||||
members:any;
|
members:any;
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ import { EventsService } from 'src/app/services/events.service';
|
|||||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { User } from 'src/app/models/user.model';
|
import { User } from 'src/app/models/user.model';
|
||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
@@ -102,7 +102,7 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
|
|
||||||
taskDocId:string;
|
taskDocId:string;
|
||||||
loadedAttachments:any;
|
loadedAttachments:any;
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
|
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -12,7 +12,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
|||||||
import { ExpedienteDetailPage } from '../expediente-detail/expediente-detail.page';
|
import { ExpedienteDetailPage } from '../expediente-detail/expediente-detail.page';
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
import { AlertService } from 'src/app/services/alert.service';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { User } from 'src/app/models/user.model';
|
import { User } from 'src/app/models/user.model';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
@@ -62,7 +62,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
taskDescription: string;
|
taskDescription: string;
|
||||||
|
|
||||||
loadedAttachments:any;
|
loadedAttachments:any;
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
|
|
||||||
subjectTypes:any[] = [];
|
subjectTypes:any[] = [];
|
||||||
selectedTypes: string[]=[];
|
selectedTypes: string[]=[];
|
||||||
|
|||||||
+2
-2
@@ -15,7 +15,7 @@ import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-
|
|||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||||
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
|
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
|
||||||
@@ -42,7 +42,7 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
profile: string;
|
profile: string;
|
||||||
intervenientes: any;
|
intervenientes: any;
|
||||||
cc: any = [];
|
cc: any = [];
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
attachments:any;
|
attachments:any;
|
||||||
|
|
||||||
hideSendToPendentes = true
|
hideSendToPendentes = true
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
|||||||
import { OptsExpedientePrPage } from 'src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page';
|
import { OptsExpedientePrPage } from 'src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
cc: any = [];
|
cc: any = [];
|
||||||
|
|
||||||
loggeduser: User;
|
loggeduser: User;
|
||||||
documents:SearchDocument[] = [];
|
documents: SearchList[] = [];
|
||||||
attachments:any;
|
attachments:any;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -341,7 +341,7 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
modal.onDidDismiss().then(res => {
|
modal.onDidDismiss().then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if(res.data){
|
if(res.data){
|
||||||
const DocumentToSave = res.data.documents.map((e:SearchDocument) => {
|
const DocumentToSave = res.data.documents.map((e:SearchList) => {
|
||||||
return {
|
return {
|
||||||
ApplicationId: e.ApplicationType,
|
ApplicationId: e.ApplicationType,
|
||||||
SourceId: e.Id,
|
SourceId: e.Id,
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { ModalController, NavParams } from '@ionic/angular';
|
import { ModalController, NavParams } from '@ionic/angular';
|
||||||
import { SearchService } from "../../services/search.service";
|
import { SearchService } from "../../services/search.service";
|
||||||
import { SearchCategory } from "src/app/models/search-category";
|
import { SearchCategory } from "src/app/models/search-category";
|
||||||
import { SearchDocument } from "src/app/models/search-document";
|
|
||||||
import { formatDate } from '@angular/common';
|
import { formatDate } from '@angular/common';
|
||||||
import { SenderPage } from 'src/app/pages/search/sender/sender.page';
|
import { SenderPage } from 'src/app/pages/search/sender/sender.page';
|
||||||
import { OrganicEntityPage } from 'src/app/pages/search/organic-entity/organic-entity.page';
|
import { OrganicEntityPage } from 'src/app/pages/search/organic-entity/organic-entity.page';
|
||||||
@@ -10,6 +9,7 @@ import WordCloud from 'src/plugin/wordcloud2.js';
|
|||||||
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 { PublicationDetailPage } from '../publications/view-publications/publication-detail/publication-detail.page';
|
import { PublicationDetailPage } from '../publications/view-publications/publication-detail/publication-detail.page';
|
||||||
import { DocumentDetailPage } from 'src/app/modals/document-detail/document-detail.page';
|
import { DocumentDetailPage } from 'src/app/modals/document-detail/document-detail.page';
|
||||||
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-search',
|
selector: 'app-search',
|
||||||
@@ -27,9 +27,9 @@ export class SearchPage implements OnInit {
|
|||||||
ordinance: string;
|
ordinance: string;
|
||||||
|
|
||||||
searchCategories: SearchCategory[] = [];
|
searchCategories: SearchCategory[] = [];
|
||||||
showSearchDocuments: SearchDocument[] = [];
|
showSearchDocuments: SearchList[] = [];
|
||||||
showCategory: string;
|
showCategory: string;
|
||||||
searchDocuments: SearchDocument[] =[];
|
searchDocuments: SearchList[] =[];
|
||||||
|
|
||||||
showDocuments = false;
|
showDocuments = false;
|
||||||
showAdvanceSearch = false;
|
showAdvanceSearch = false;
|
||||||
@@ -85,7 +85,7 @@ export class SearchPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
selectItem(item: SearchDocument) {
|
selectItem(item: SearchList) {
|
||||||
if(this.select){
|
if(this.select){
|
||||||
this.modalController.dismiss({
|
this.modalController.dismiss({
|
||||||
selected: item
|
selected: item
|
||||||
@@ -552,7 +552,7 @@ export class SearchPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async viewDetail(searchDocument: SearchDocument) {
|
async viewDetail(searchDocument: SearchList) {
|
||||||
|
|
||||||
const ApplicationType = searchDocument.ApplicationType.toString()
|
const ApplicationType = searchDocument.ApplicationType.toString()
|
||||||
const Id = searchDocument.Id
|
const Id = searchDocument.Id
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { EventPipe } from './event.pipe';
|
||||||
|
|
||||||
|
describe('EventPipe', () => {
|
||||||
|
it('create an instance', () => {
|
||||||
|
const pipe = new EventPipe();
|
||||||
|
expect(pipe).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
|
import { SearchDocumentDetails, SearchFolderDetails, SearchList } from '../models/search-document';
|
||||||
|
|
||||||
|
@Pipe({
|
||||||
|
name: 'event'
|
||||||
|
})
|
||||||
|
export class EventPipe implements PipeTransform {
|
||||||
|
|
||||||
|
transform(value: unknown, ...args: unknown[]): unknown {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
AttactSearchResult(seachDocument: SearchList, eventId, {Source = '1'}): addAttachment {
|
||||||
|
|
||||||
|
return {
|
||||||
|
SourceTitle: seachDocument.Assunto,
|
||||||
|
ParentId: eventId,
|
||||||
|
Source: Source,
|
||||||
|
SourceId: seachDocument.Id,
|
||||||
|
ApplicationId: seachDocument.ApplicationType.toString(),
|
||||||
|
Id: '',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: ''
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
AttactSearchResultDetails(searchResult: SearchFolderDetails | SearchDocumentDetails, eventId, {Source = '1'}) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,10 +2,11 @@ import { NgModule } from '@angular/core';
|
|||||||
import { FilterPipe } from './filter.pipe';
|
import { FilterPipe } from './filter.pipe';
|
||||||
import { SearchDocumentPipe } from './search-document.pipe';
|
import { SearchDocumentPipe } from './search-document.pipe';
|
||||||
import { CustomTaskPipe } from './custom-task.pipe';
|
import { CustomTaskPipe } from './custom-task.pipe';
|
||||||
|
import { EventPipe } from './event.pipe';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [FilterPipe, SearchDocumentPipe, CustomTaskPipe],
|
declarations: [FilterPipe, SearchDocumentPipe, CustomTaskPipe, EventPipe],
|
||||||
exports: [FilterPipe],
|
exports: [FilterPipe],
|
||||||
imports: []
|
imports: []
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { Attachments, SearchDocument } from '../models/search-document';
|
import { Attachments, SearchList } from '../models/search-document';
|
||||||
|
|
||||||
@Pipe({
|
@Pipe({
|
||||||
name: 'searchDocument'
|
name: 'searchDocument'
|
||||||
@@ -10,7 +10,7 @@ export class SearchDocumentPipe implements PipeTransform {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
transformToAttachment(document: SearchDocument): Attachments[] {
|
transformToAttachment(document: SearchList): Attachments[] {
|
||||||
const attachments = []
|
const attachments = []
|
||||||
|
|
||||||
if(document.ApplicationType == 361) {
|
if(document.ApplicationType == 361) {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EventService } from './event.service';
|
||||||
|
|
||||||
|
describe('EventService', () => {
|
||||||
|
let service: EventService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(EventService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||||
|
import { AttachmentsService } from '../attachments.service';
|
||||||
|
import { EventsService } from '../events.service';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class EventService {
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private eventService: EventsService,
|
||||||
|
public p: PermissionService,
|
||||||
|
private attachmentsService: AttachmentsService,
|
||||||
|
) { }
|
||||||
|
|
||||||
|
|
||||||
|
create({body, calendar}) {
|
||||||
|
|
||||||
|
|
||||||
|
if(this.p.userRole(['PR'])) {
|
||||||
|
return this.eventService.postEventPr(body, calendar)
|
||||||
|
} else {
|
||||||
|
return this.eventService.postEventMd(body, calendar)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
addAttachment(attachment: addAttachment) {
|
||||||
|
return this.attachmentsService.setEventAttachmentById(attachment)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ import { AlertController, ModalController } from '@ionic/angular';
|
|||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { Attachment } from 'src/app/models/attachment.model';
|
import { Attachment } from 'src/app/models/attachment.model';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
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';
|
||||||
@@ -443,7 +443,7 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
modal.onDidDismiss().then( async (res)=>{
|
modal.onDidDismiss().then( async (res)=>{
|
||||||
if(res){
|
if(res){
|
||||||
|
|
||||||
const data: SearchDocument = res.data.selected;
|
const data: SearchList = res.data.selected;
|
||||||
|
|
||||||
const DocumentToSave: any = {
|
const DocumentToSave: any = {
|
||||||
SourceTitle: data.Assunto,
|
SourceTitle: data.Assunto,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { Event } from 'src/app/models/event.model';
|
|||||||
import { ModalController } from '@ionic/angular';
|
import { ModalController } from '@ionic/angular';
|
||||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { SearchDocument } from "src/app/models/search-document";
|
import { SearchList } from "src/app/models/search-document";
|
||||||
import { EventAttachment } from 'src/app/models/attachment.model';
|
import { EventAttachment } from 'src/app/models/attachment.model';
|
||||||
|
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
@@ -86,7 +86,7 @@ export class NewEventPage implements OnInit {
|
|||||||
@Output() GoBackEditOrAdd = new EventEmitter<any>();
|
@Output() GoBackEditOrAdd = new EventEmitter<any>();
|
||||||
@Output() cloneAllmobileComponent = new EventEmitter<any>();
|
@Output() cloneAllmobileComponent = new EventEmitter<any>();
|
||||||
|
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
|
|
||||||
// minDate: string;
|
// minDate: string;
|
||||||
|
|
||||||
@@ -448,6 +448,7 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
const eventId: any = id;
|
const eventId: any = id;
|
||||||
|
|
||||||
|
|
||||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||||
return {
|
return {
|
||||||
SourceTitle: e.Assunto,
|
SourceTitle: e.Assunto,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
|||||||
import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular';
|
import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||||
import { Attachment } from 'src/app/models/attachment.model';
|
import { Attachment } from 'src/app/models/attachment.model';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||||
@@ -382,7 +382,7 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
modal.onDidDismiss().then( async (res)=>{
|
modal.onDidDismiss().then( async (res)=>{
|
||||||
if(res){
|
if(res){
|
||||||
|
|
||||||
const data: SearchDocument = res.data.selected;
|
const data: SearchList = res.data.selected;
|
||||||
|
|
||||||
const DocumentToSave: any = {
|
const DocumentToSave: any = {
|
||||||
SourceTitle: data.Assunto,
|
SourceTitle: data.Assunto,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { NewEventPage } from 'src/app/pages/agenda/new-event/new-event.page';
|
import { NewEventPage } from 'src/app/pages/agenda/new-event/new-event.page';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
import { AlertService } from 'src/app/services/alert.service';
|
||||||
@@ -14,7 +14,7 @@ import { environment } from 'src/environments/environment';
|
|||||||
})
|
})
|
||||||
export class ChatOptionsPopoverPage implements OnInit {
|
export class ChatOptionsPopoverPage implements OnInit {
|
||||||
|
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
members: any;
|
members: any;
|
||||||
attendees: EventPerson[] = [];
|
attendees: EventPerson[] = [];
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||||
import { AnimationController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
import { AnimationController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { User } from 'src/app/models/user.model';
|
import { User } from 'src/app/models/user.model';
|
||||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||||
@@ -32,7 +32,7 @@ export class OptsExpedientePrPage implements OnInit {
|
|||||||
serialnumber: string;
|
serialnumber: string;
|
||||||
profile: string;
|
profile: string;
|
||||||
|
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
attachments:any;
|
attachments:any;
|
||||||
|
|
||||||
showEnviarPendentes = false;
|
showEnviarPendentes = false;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||||
import { customTask, expedienteTask, fullTask } from 'src/app/models/dailyworktask.model';
|
import { expedienteTask } from 'src/app/models/dailyworktask.model';
|
||||||
import { SearchDocument } from 'src/app/models/search-document';
|
import { SearchList } from 'src/app/models/search-document';
|
||||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||||
@@ -28,7 +28,7 @@ export class OptsExpedientePage implements OnInit {
|
|||||||
|
|
||||||
showEnviarPendentes = false
|
showEnviarPendentes = false
|
||||||
searchDocumentPipe = new SearchDocumentPipe()
|
searchDocumentPipe = new SearchDocumentPipe()
|
||||||
documents:SearchDocument[] = [];
|
documents:SearchList[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private popoverController: PopoverController,
|
private popoverController: PopoverController,
|
||||||
|
|||||||
Reference in New Issue
Block a user