From 022bbbec38c9241817e35b6938aad07391110cad Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 29 Jul 2021 10:13:39 +0100 Subject: [PATCH 1/9] Add setup meetting from document modal --- src/app/Rules/despacho-md.service.ts | 4 +- src/app/Rules/document.service.spec.ts | 16 + src/app/Rules/document.service.ts | 19 + src/app/app-routing.module.ts | 9 +- .../document-detail/document-detail.page.ts | 3 +- .../document-set-up-meeting-routing.module.ts | 17 + .../document-set-up-meeting.module.ts | 57 +++ .../document-set-up-meeting.page.html | 355 +++++++++++++++++ .../document-set-up-meeting.page.scss | 209 ++++++++++ .../document-set-up-meeting.page.spec.ts | 24 ++ .../document-set-up-meeting.page.ts | 357 ++++++++++++++++++ src/app/models/CallMeeting.ts | 4 +- .../event-list/event-list.page.ts | 4 +- .../book-meeting-modal.page.ts | 2 +- src/app/pages/search/search.page.ts | 12 +- src/app/services/processes.service.ts | 11 +- 16 files changed, 1082 insertions(+), 21 deletions(-) create mode 100644 src/app/Rules/document.service.spec.ts create mode 100644 src/app/Rules/document.service.ts create mode 100644 src/app/modals/document-set-up-meeting/document-set-up-meeting-routing.module.ts create mode 100644 src/app/modals/document-set-up-meeting/document-set-up-meeting.module.ts create mode 100644 src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html create mode 100644 src/app/modals/document-set-up-meeting/document-set-up-meeting.page.scss create mode 100644 src/app/modals/document-set-up-meeting/document-set-up-meeting.page.spec.ts create mode 100644 src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts diff --git a/src/app/Rules/despacho-md.service.ts b/src/app/Rules/despacho-md.service.ts index ca065d75d..c4a36960b 100644 --- a/src/app/Rules/despacho-md.service.ts +++ b/src/app/Rules/despacho-md.service.ts @@ -21,7 +21,7 @@ export class DespachoMdService { ) { } arquivar(note:string, documents:any, serialnumber) { - + let body = { "serialNumber": serialnumber, "action": "Arquivo", @@ -64,7 +64,7 @@ export class DespachoMdService { return this.processes.CompleteTask(body) } - + sendExpedienteToPending(serialnumber) { return this.processes.SetTaskToPending(serialnumber) diff --git a/src/app/Rules/document.service.spec.ts b/src/app/Rules/document.service.spec.ts new file mode 100644 index 000000000..49475199d --- /dev/null +++ b/src/app/Rules/document.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { DocumentService } from './document.service'; + +describe('DocumentService', () => { + let service: DocumentService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(DocumentService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/Rules/document.service.ts b/src/app/Rules/document.service.ts new file mode 100644 index 000000000..a402aa1d7 --- /dev/null +++ b/src/app/Rules/document.service.ts @@ -0,0 +1,19 @@ +import { Injectable } from '@angular/core'; +import { DocumentSetUpMeeting } from '../models/CallMeeting'; +import { ProcessesService } from '../services/processes.service'; + +@Injectable({ + providedIn: 'root' +}) +export class DocumentService { + + constructor( + private processes: ProcessesService + ) { } + + setUpMeeting(data: DocumentSetUpMeeting) { + + this.processes.documentSetUpMeeting(data) + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index eaeb56b01..1f713f14a 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -151,13 +151,18 @@ const routes = [ { path: 'eliminate-event', loadChildren: () => import('./modals/eliminate-event/eliminate-event.module').then( m => m.EliminateEventPageModule) + }, + { + path: 'inactivity', + loadChildren: () => import('./pages/inactivity/inactivity.module').then( m => m.InactivityPageModule) }, { - path: 'inactivity', - loadChildren: () => import('./pages/inactivity/inactivity.module').then( m => m.InactivityPageModule) + path: 'document-set-up-meeting', + loadChildren: () => import('./modals/document-set-up-meeting/document-set-up-meeting.module').then( m => m.DocumentSetUpMeetingPageModule) }, + /* path: 'chat', component: ChatPage diff --git a/src/app/modals/document-detail/document-detail.page.ts b/src/app/modals/document-detail/document-detail.page.ts index 0a7790cfe..d856aadbd 100644 --- a/src/app/modals/document-detail/document-detail.page.ts +++ b/src/app/modals/document-detail/document-detail.page.ts @@ -5,6 +5,7 @@ import { ProcessesService } from 'src/app/services/processes.service'; 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 { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page'; +import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page'; @Component({ selector: 'app-document-detail', @@ -163,7 +164,7 @@ export class DocumentDetailPage implements OnInit { classs = 'modal modal-desktop showAsideOptions' } const modal = await this.modalController.create({ - component: BookMeetingModalPage, + component: DocumentSetUpMeetingPage, componentProps: { task: task, }, diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting-routing.module.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting-routing.module.ts new file mode 100644 index 000000000..9bec79f58 --- /dev/null +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { DocumentSetUpMeetingPage } from './document-set-up-meeting.page'; + +const routes: Routes = [ + { + path: '', + component: DocumentSetUpMeetingPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class DocumentSetUpMeetingPageRoutingModule {} diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.module.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting.module.ts new file mode 100644 index 000000000..7e872039d --- /dev/null +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.module.ts @@ -0,0 +1,57 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { IonicModule } from '@ionic/angular'; + +import { DocumentSetUpMeetingPageRoutingModule } from './document-set-up-meeting-routing.module'; +import { DocumentSetUpMeetingPage } from './document-set-up-meeting.page'; +import { EmptyContainerPageModule } from 'src/app/shared/empty-container/empty-container.module'; +import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module'; +import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module'; + + +import { MatNativeDateModule } from '@angular/material/core'; +import { + NgxMatDateFormats, + NgxMatDatetimePickerModule, + NgxMatNativeDateModule, + NgxMatTimepickerModule, + NGX_MAT_DATE_FORMATS +} 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'; +import { MAT_DATE_LOCALE } from '@angular/material/core'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { MatInputModule } from '@angular/material/input'; + + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + DocumentSetUpMeetingPageRoutingModule, + // + + EmptyContainerPageModule, + + AttendeeModalPageModule, + EmptyContainerPageModule, + BtnModalDismissPageModule, + // Angular material + MatDatepickerModule, + MatInputModule, + MatNativeDateModule, + NgxMatDatetimePickerModule, + NgxMatTimepickerModule, + NgxMatNativeDateModule, + NgxMatMomentModule, + MatSelectModule, + MatButtonModule, + ReactiveFormsModule + ], + declarations: [DocumentSetUpMeetingPage] +}) +export class DocumentSetUpMeetingPageModule {} diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html new file mode 100644 index 000000000..bdb4a52ef --- /dev/null +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html @@ -0,0 +1,355 @@ + +
+ +
+
+
+ + + + + +
+
+
+ +
+ +
+ +
+
+
+ Campo obrigatório. +
+
+ O campo deve ter pelo menos 4 caracteres. +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + + +
+
+
+ +
+
+ + Oficial + Pessoal + + + + + + + Oficial + + + Pessoal + + + + +
+
+
+ + +
+
+
+ +
+
+ + + Reunião + Viagem + Conferência + Encontro + + + + + + + + Reunião + + + Viagem + + + Conferência + + + Encontro + + + + + +
+
+
+ +
+
+
+ +
+
+ + + + + + + + + + +
+
+
+ +
+
+
+ +
+
+ + + + + + + + + +
+
+
+ +
+
+
+ +
+
+ + Não se repete + Repete + + + + + + + + Não se repete + + + Repete + + + + +
+
+
+ + + + +
+
+
+ +
+
+
+ + + Adicionar intervenientes* + {{participant.Name}} + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ + + Com conhecimento + {{participant.Name}} + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ +
+
+ Anexar Documentos +
+
+
+ +
+ + + +

+ {{document.Assunto}} + {{document.appName}} + + + +

+

{{document.EntidadeOrganicaNome}} {{document.Data | date: 'dd-MM-yy'}}

+
+
+
+
+
+
+ +
+ + + + +
+
+
+ +
+ + +
+
+ diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.scss b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.scss new file mode 100644 index 000000000..637cd24d1 --- /dev/null +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.scss @@ -0,0 +1,209 @@ +.content{ + margin: 0; + float: left; + + .header-content{ + } + .header-title{ + font-family: Roboto; + font-size: 25px; + padding: 0; + color:#000; + float: left; + } + + .ion-item-container{ + margin: 15px auto; + border: 1px solid #ebebeb; + border-radius: 5px; + padding-left: 10px; + + } + .ion-item-container-no-border{ + margin: 0px auto; + padding: 0 !important; + overflow: auto; + } + .container-div{ + margin-bottom: 15px; + overflow: hidden; + } + .ion-item-class-2{ + margin: 0px auto; + } + .ion-icon-class{ + width: 45px; + height: 45px; + float: left; + padding: 10px; + font-size: 25px; + } + ion-select{ + padding-left: 5px; + margin-left: 0; + } + .ion-input-class{ + width: calc(100% - 45px); + height: 45px; + border: 1px solid #ebebeb; + border-radius: 5px; + padding-left: 5px; + padding-right: 10px; + float: left; + } + .ion-input-class-no-height{ + border: 1px solid #ebebeb; + border-radius: 5px; + overflow: auto; + } + .list-people{ + width: 256px; + float: left; + + } + .add-people{ + width: 45px; + float: right; + overflow: auto; + font-size: 25px; + padding: 10px; + } + .list-people-title{ + /* font-size: 13px; */ + color: #a3a3a3; + } + .attach-document{ + font-size: 15px; + color: #0d89d1; + margin: 5px 5px 5px 10px; + padding: 5px; + float: left; + } + .attach-icon{ + width: 37px; + font-size: 35px; + float: left; + } + .attach-title-item{ + width: 100%; + font-size: 15px; + color:#0d89d1; + } + /* SPAN */ + .span-left{ + float: left; + font-size: 15x; + } + .span-right{ + text-align: right; + float: right; + font-size: 13px; + } + } + .container-footer{ + margin:0 auto; + overflow: auto; + } + .button-cancel { + width: 170px; + height: 44px; + border-radius: 22.5px; + --background: #e0e9ee; + --color: #061b52; + margin:10px; + } + .button-save { + width: 170px; + height: 44px; + border-radius: 22.5px; + --background: #42b9fe; + --color:#ffffff; + margin:10px; + } + + .text-input{ + width: 100%; + border: 1px solid #ebebeb; + margin: 0px 15px 15px 0px; + padding: 0 !important; + border-radius: 5px; + } + + /* Error Messages */ + .error{ + color:red; + font-size: 12px; + font-weight: bold; + padding-bottom: 20px; + } + .span-color{ + color:red; + } + .buttons{ + display: flex; + justify-content: space-between; + padding: 20px; + overflow: auto; + } + + + .attach-icon{ + width: 37px; + font-size: 35px; + float: left; + } + .attach-title-item{ + width: 100%; + font-size: 15px; + color:#0d89d1; + } + /* SPAN */ + .span-left{ + float: left; + font-size: 15x; + } + .span-right{ + text-align: right; + float: right; + font-size: 13px; + } + + + + + + + .app-name{ + background: #42b9f2; + border-radius: 18px; + text-align: center; + display: flex; + align-items: center; + padding: 0px 5px; + color: white; + font-size: 9pt; + font-weight: 500; + height: 19px; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + -ms-border-radius: 18px; + -o-border-radius: 18px; + } + + + .close-button { + display: none; + } + + + .list:hover { + + .app-name { + display: none; + } + + .close-button { + display: block !important; + } + } + \ No newline at end of file diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.spec.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.spec.ts new file mode 100644 index 000000000..6ae6182e2 --- /dev/null +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { DocumentSetUpMeetingPage } from './document-set-up-meeting.page'; + +describe('DocumentSetUpMeetingPage', () => { + let component: DocumentSetUpMeetingPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ DocumentSetUpMeetingPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(DocumentSetUpMeetingPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts new file mode 100644 index 000000000..7924f1b0b --- /dev/null +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts @@ -0,0 +1,357 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { AnimationController, ModalController, NavParams } from '@ionic/angular'; +import { Event } from 'src/app/models/event.model' +import { EventBody } from 'src/app/models/eventbody.model'; +import { ProcessesService } from 'src/app/services/processes.service'; +import { EventPerson } from 'src/app/models/eventperson.model'; +import { EventsService } from 'src/app/services/events.service'; +import { AttachmentsService } from 'src/app/services/attachments.service'; +import { SearchPage } from 'src/app/pages/search/search.page'; +import { SearchDocument } from 'src/app/models/search-document'; +import { User } from 'src/app/models/user.model'; +import { AuthService } from 'src/app/services/auth.service'; +import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page'; +import { ToastService } from 'src/app/services/toast.service'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; +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'; +import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page'; +import { DocumentService } from 'src/app/Rules/document.service'; + +const moment = _rollupMoment || _moment; + +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-document-set-up-meeting', + templateUrl: './document-set-up-meeting.page.html', + styleUrls: ['./document-set-up-meeting.page.scss'], +}) +export class DocumentSetUpMeetingPage implements OnInit { + + public date: any; + public disabled = false; + public showSpinners = true; + public showSeconds = false; + public touchUi = false; + public enableMeridian = false; + public minDate = new Date(); + + public stepHour = 1; + public stepMinute = 5; + public stepSecond = 5; + + public dateControlStart = new FormControl(moment("DD MM YYYY hh")); + public dateControlEnd = new FormControl(moment("DD MM YYYY hh")); + + p: any = {} + + Form: FormGroup; + validateFrom = 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('fim') fim: any; + @ViewChild('inicio') inicio: any; + @ViewChild('picker1') picker1: any; + + task: any; + + taskParticipants: EventPerson[] = []; + taskParticipantsCc: EventPerson[] = []; + + taskDocId:string; + loadedAttachments:any; + documents:SearchDocument[] = []; + + adding: "intervenient" | "CC" = "intervenient"; + + postData: Event; + eventBody: EventBody; + + formLocationSatus: boolean = false; + showAttendees= false; + loggeduser: User; + emptyTextDescription = "Sem intervenientes selecionados"; + + constructor( + private modalController: ModalController, + private router:Router, + private navParams: NavParams, + private processes:ProcessesService, + private attachmentsService: AttachmentsService, + private calendarService: EventsService, + authService: AuthService, + private animationController: AnimationController, + private toastService: ToastService, + private activatedRoute: ActivatedRoute, + private documentService: DocumentService + ) { + + this.loggeduser = authService.ValidatedUser; + this.task = this.navParams.get('task'); + this.postData = new Event(); + 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.Category = 'Reunião' + } + + ngOnInit() { + this.adding = "intervenient"; + console.log(this.task); + this.getAttachments(); + this.setDefaultTime() + } + + setDefaultTime() { + this.postData.StartDate = new Date() + this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000)) + } + + getAttachments() { + this.attachmentsService.getAttachmentsBySerial(this.task.SerialNumber).subscribe(res=>{ + this.loadedAttachments = res; + }); + } + + close() { + this.modalController.dismiss(null); + } + + goBack() { + this.modalController.dismiss(null); + } + + runValidation() { + this.validateFrom = true + } + + get dateValid() { + if (window.innerWidth <= 800) { + return this.postData.StartDate < this.postData.EndDate? ['ok']: [] + } else { + return ['ok'] + } + } + + injectValidation() { + + this.Form = new FormGroup({ + Subject: new FormControl(this.postData.Subject, [ + // Validators.required, + // Validators.minLength(4) + ]), + Location: new FormControl(this.postData.Location, [ + // Validators.required, + ]), + CalendarName: new FormControl(this.postData.CalendarName, [ + // Validators.required + ]), + Date: new FormControl(this.dateValid, [ + Validators.required + ]), + participantes: new FormControl(this.taskParticipants, [ + // Validators.required + ]), + Categories: new FormControl(this.postData.Category, [ + // Validators.required + ]), + + }) + } + + async saveTask(){ + + if(this.loggeduser.Profile == 'MDGPR') { + this.injectValidation() + this.runValidation() + } + + let Attendees = this.taskParticipants.concat(this.taskParticipantsCc); + + this.eventBody={ + BodyType: '1', + Text: this.postData.Body.Text, + } + + this.postData = { + EventId: '', + Subject: this.postData.Subject, + Body: this.eventBody, + Location: this.postData.Location, + CalendarId: '', + CalendarName: this.postData.CalendarName, + StartDate: this.dateStart, + EndDate: this.dateEnd, + EventType: 'Reunião', + Attendees: Attendees, + IsMeeting: false, + IsRecurring: false, + AppointmentState: 0, + TimeZone: 'UTC', + Organizer: null, + Category: 'Reunião', + HasAttachments: true, + EventRecurrence: null, + } + + // this.documentService.setUpMeeting() + } + + async addParticipants() { + + this.adding = "intervenient"; + + if(window.innerWidth <= 801){ + const modal = await this.modalController.create({ + component: AttendeesPageModal, + componentProps: { + adding: this.adding, + taskParticipants: this.taskParticipants, + taskParticipantsCc: this.taskParticipantsCc + }, + cssClass: 'modal modal-desktop', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then((data) => { + + if(data) { + data = data['data']; + + const newAttendees: EventPerson[] = data['taskParticipants']; + const newAttendeesCC: EventPerson[] = data['taskParticipantsCc']; + + this.setIntervenient(newAttendees); + this.setIntervenientCC(newAttendeesCC); + } + }); + + } else { + this.showAttendees = true; + } + } + + async addParticipantsCc() { + + this.adding = "CC"; + + if(window.innerWidth <= 800) { + const modal = await this.modalController.create({ + component: AttendeesPageModal, + componentProps: { + adding: this.adding, + taskParticipants: this.taskParticipants, + taskParticipantsCc: this.taskParticipantsCc + }, + cssClass: 'modal modal-desktop', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then((data) => { + + if(data){ + data = data['data']; + + const newAttendees: EventPerson[] = data['taskParticipants']; + const newAttendeesCC: EventPerson[] = data['taskParticipantsCc']; + + this.setIntervenient(newAttendees); + this.setIntervenientCC(newAttendeesCC); + } + }); + } else { + this.showAttendees = true; + } + } + + async getDoc() { + const modal = await this.modalController.create({ + component: SearchPage, + cssClass: 'modal-width-100-width-background modal', + componentProps: { + type: 'AccoesPresidenciais & ArquivoDespachoElect', + showSearchInput: true, + select: true + } + }); + await modal.present(); + modal.onDidDismiss().then((res)=> { + if(res){ + const data = res.data; + this.documents.push(data.selected); + } + }); + } + + removeAttachment(index: number) { + this.documents = this.documents.filter( (e, i) => index != i); + } + + validateFormInputs(){ + let formLocation = this.postData.Location.trim(); + if(!this.postData.Location && formLocation.length <= 0){ + this.formLocationSatus = true; + } + } + + dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) { + this.taskParticipants = taskParticipants; + this.taskParticipantsCc = taskParticipantsCc; + } + + goToGabinete() { + this.router.navigate(['/home/gabinete-digital']); + } + + setIntervenient(data) { + this.taskParticipants = data; + } + + setIntervenientCC(data) { + this.taskParticipantsCc = data; + } + +} diff --git a/src/app/models/CallMeeting.ts b/src/app/models/CallMeeting.ts index 501d7350f..4cda73e17 100644 --- a/src/app/models/CallMeeting.ts +++ b/src/app/models/CallMeeting.ts @@ -1,4 +1,4 @@ -export class CallMeeting { +export class DocumentSetUpMeeting { "EventProcess": { "SerialNumber": "sample string 1", "Body": "sample string 2", @@ -38,7 +38,7 @@ export class CallMeeting { "Participants": "sample string 15", "CC": "sample string 16" } - + "Attachment": { "Id": 1, "ParentId": "sample string 2", diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts index 2ab7841ad..def667ae3 100644 --- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts +++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts @@ -134,8 +134,8 @@ export class EventListPage implements OnInit { close(){ this.modalController.dismiss(null); } - goBack(){ - if(this.router.url == '/home/agenda/event-list'){ + goBack() { + if(this.router.url == '/home/agenda/event-list') { this.router.navigate(['/home/agenda']); } else if(this.router.url == '/home/gabinete-digital/event-list'){ diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts index 3af68d03a..a896dddc0 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts @@ -167,7 +167,7 @@ export class BookMeetingModalPage implements OnInit { }); } - close(){ + close() { this.modalController.dismiss(null); } diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index 6f684159a..29b55a0e6 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -124,7 +124,7 @@ export class SearchPage implements OnInit { } - wordCloud(){ + wordCloud() { this.search.mostSeachWord("15").subscribe(res=>{ @@ -173,7 +173,7 @@ export class SearchPage implements OnInit { } - loadWordCloud(){ + loadWordCloud() { setTimeout(()=>{ const elem = document.documentElement.querySelector('.most-searched-word-container'); @@ -191,12 +191,12 @@ export class SearchPage implements OnInit { } - close(){ + close() { this.modalController.dismiss(); } - reorderList(orderBy: string){ + reorderList(orderBy: string) { this.ordinance = orderBy; @@ -207,7 +207,7 @@ export class SearchPage implements OnInit { } } - sortArrayISODate(myArray: any){ + sortArrayISODate(myArray: any) { return myArray.sort(function(a, b) { return (a.Data < b.Data) ? -1 : ((a.Data > b.Data) ? 1 : 0); }); @@ -216,7 +216,7 @@ export class SearchPage implements OnInit { /** * @description Basic search */ - basicSearch(){ + basicSearch() { if(this.type == "Agenda" ){ diff --git a/src/app/services/processes.service.ts b/src/app/services/processes.service.ts index 68b44d4a2..7f8addef0 100644 --- a/src/app/services/processes.service.ts +++ b/src/app/services/processes.service.ts @@ -5,7 +5,7 @@ import { AuthService } from '../services/auth.service'; import { User } from '../models/user.model'; import { environment } from 'src/environments/environment'; import { Observable } from 'rxjs'; -import { CallMeeting } from '../models/CallMeeting'; +import { DocumentSetUpMeeting } from '../models/CallMeeting'; import { Excludetask } from '../models/Excludetask'; @Injectable({ @@ -275,14 +275,15 @@ export class ProcessesService { return this.http.get(`${geturl}`, options); } - CallMeeting(body: CallMeeting) { - const geturl = environment.apiURL + 'Processes/CallMeeting'; + documentSetUpMeeting(body: DocumentSetUpMeeting) { + + let url = environment.apiURL + 'Processes/CallMeeting'; + url = url.replace('/V4/','/V5/') let options: any = { headers: this.headers, } - - return this.http.post(`${geturl}`,body, options); + return this.http.post(`${url}`,body, options); } } From 92d438b506e5c3540579274a8af17915fa5bf690 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 29 Jul 2021 10:56:00 +0100 Subject: [PATCH 2/9] save --- .../edit-profile/edit-profile.page.html | 42 +++++-- .../edit-profile/edit-profile.page.scss | 110 +++++++++++------- src/app/modals/profile/profile.page.scss | 2 - .../events/edit-event/edit-event.page.html | 12 +- src/app/pages/events/events.module.ts | 1 - src/global.scss | 5 +- 6 files changed, 105 insertions(+), 67 deletions(-) diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.html b/src/app/modals/profile/edit-profile/edit-profile.page.html index a80695759..33014055b 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.html +++ b/src/app/modals/profile/edit-profile/edit-profile.page.html @@ -1,13 +1,12 @@ -
+
+
-
+
-
- -
-
-
Perfil
+
+
+
Dados do perfil
Campo obrigatório - + Descrição @@ -60,7 +60,7 @@ displayFormat="D MMM YYYY HH:mm" minuteValues="0,15,30,45" monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"> - +
@@ -74,11 +74,11 @@ - {{attendee.Name}} + {{attendee.Name}}
- +
@@ -104,7 +104,7 @@

{{ att.Description }}

{{ att.CreateDate }}

-
+
diff --git a/src/app/pages/events/events.module.ts b/src/app/pages/events/events.module.ts index 3f6e79aaf..1d2f27189 100644 --- a/src/app/pages/events/events.module.ts +++ b/src/app/pages/events/events.module.ts @@ -16,7 +16,6 @@ import { HeaderNoSearchPageModule } from 'src/app/shared/headers/header-no-searc CommonModule, FormsModule, IonicModule, - EventsPageRoutingModule, HeaderNoSearchPageModule, ], diff --git a/src/global.scss b/src/global.scss index d3f1e1b5e..fa2738217 100644 --- a/src/global.scss +++ b/src/global.scss @@ -365,8 +365,9 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- position: absolute; top: -40px; right: 0px; - height: 100%; + height: 90%; max-width: 400px; + border-radius: 0 0 25px 25px; } } @@ -1082,4 +1083,4 @@ ngx-mat-datetime-content{ border-left: 3px solid transparent !important; } } -} \ No newline at end of file +} From 038ccbe633c6ff7e7cf4cc5bb741a5d2a9bb1925 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 29 Jul 2021 11:40:25 +0100 Subject: [PATCH 3/9] save --- .../edit-profile/edit-profile.page.html | 132 ++++++++++-------- .../edit-profile/edit-profile.page.scss | 35 ++++- src/app/modals/profile/profile.page.html | 2 +- src/app/modals/profile/profile.page.scss | 4 +- src/global.scss | 8 +- 5 files changed, 109 insertions(+), 72 deletions(-) diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.html b/src/app/modals/profile/edit-profile/edit-profile.page.html index 33014055b..a485b69c5 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.html +++ b/src/app/modals/profile/edit-profile/edit-profile.page.html @@ -1,81 +1,91 @@ -
-
- -
- -
-
-
Dados do perfil
+
+
+ - - -
- -
-
-
+
+
+
+
Dados do perfil
+
-
-
{{loggeduser.RoleDescription}}
+ +
-
-
-
- +
+
+ +
+
+ +
+
{{loggeduser.RoleDescription}}
+ +
+
+
+ +
+
+ +
-
- +
+ +
+
+
+ +
+
+ +
-
-
-
- -
-
- -
-
+ -
- - -
- +
+ +
- - - + +