mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -423,8 +423,9 @@
|
||||
[class.transparent]="mobileComponent.transparentEventToApprove"
|
||||
[serialNumber] = "eventToaprove.serialNumber"
|
||||
[InstanceId] = "eventToaprove.InstanceId"
|
||||
[saveData] = "eventToaprove.saveData"
|
||||
(cloneAllmobileComponent)="viewEventDetailDismiss($event)"
|
||||
(closeEventToApprove)="closeEventToApprove()"
|
||||
(closeEventToApprove)="closeEventToApproveGoBack()"
|
||||
(AproveEventEditEvent)="AproveEventEditEvent($event)"
|
||||
(EditApproveEventDismiss)="EditApproveEventDismiss()"
|
||||
[eventAttendees]="contacts"
|
||||
@@ -437,10 +438,11 @@
|
||||
[taskParticipants]="taskParticipants"
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
[serialNumber] = "eventToaprove.serialNumber"
|
||||
[saveData] = "eventToaprove.saveData"
|
||||
(setContact)="setContact($event)"
|
||||
(clearContact)="clearContact()"
|
||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||
(closeComponent)="closeComponentEditEventOrAdd()"
|
||||
(closeComponent)="approveEventDismissGoBack()"
|
||||
(setIntervenient)="setIntervenient($event)"
|
||||
(setIntervenientCC)="setIntervenientCC($event)"
|
||||
></app-edit-event-to-approve>
|
||||
|
||||
@@ -20,12 +20,9 @@ import {
|
||||
DAYS_OF_WEEK,
|
||||
} from 'angular-calendar';
|
||||
import { CustomDateFormatter } from './custom-date-formatter.provider';
|
||||
import { EventListPage } from '../gabinete-digital/event-list/event-list.page';
|
||||
import { ViewEventPage } from './view-event/view-event.page';
|
||||
import { NewEventPage } from './new-event/new-event.page';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { letProto } from 'rxjs-compat/operator/let';
|
||||
import { DateAdapter } from '@angular/material/core';
|
||||
|
||||
@Component({
|
||||
@@ -1209,7 +1206,9 @@ export class AgendaPage implements OnInit {
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
}
|
||||
|
||||
async viewEventsToApprove(){
|
||||
|
||||
// called from this template and child event
|
||||
async viewEventsToApprove() {
|
||||
await this.cloneAllmobileComponent();
|
||||
|
||||
if( window.innerWidth <= 801){
|
||||
@@ -1217,13 +1216,26 @@ export class AgendaPage implements OnInit {
|
||||
} else {
|
||||
// hide all components
|
||||
this.cloneAllmobileComponent();
|
||||
this.mobileComponent.transparentEventList = false;
|
||||
this.mobileComponent.showEventList = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
approveEventDismissGoBack() {
|
||||
|
||||
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
||||
// this.mobileComponent.showEventList = false;
|
||||
this.mobileComponent.transparentEventList = true;
|
||||
this.mobileComponent.showEventToApprove = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
approveEventDismiss({saveData, serialNumber, action}){
|
||||
|
||||
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
|
||||
|
||||
if(action == 'Aprovar'){
|
||||
this.eventToaprove = {
|
||||
back: true,
|
||||
@@ -1235,19 +1247,26 @@ export class AgendaPage implements OnInit {
|
||||
this.mobileComponent.transparentEventList = true;
|
||||
this.mobileComponent.showEventToApprove = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
closeEventToApprove(){
|
||||
if (this.eventToaprove.back ==true && this.mobileComponent.showEventList ==true){
|
||||
this.mobileComponent.transparentEventList = false;
|
||||
this.mobileComponent.showEventToApprove = false;
|
||||
this.eventToaprove.back = false;
|
||||
}
|
||||
else {
|
||||
this.mobileComponent.showEventToApprove = false;
|
||||
this.mobileComponent.showEventList = false;
|
||||
}
|
||||
closeEventToApprove() {
|
||||
|
||||
this.mobileComponent.showEventToApprove = false;
|
||||
this.mobileComponent.showEventList = true;
|
||||
|
||||
}
|
||||
|
||||
closeEventToApproveGoBack() {
|
||||
if( window.innerWidth <= 801){
|
||||
this.router.navigate(['/home/agenda/event-list']);
|
||||
} else {
|
||||
// hide all components
|
||||
this.cloneAllmobileComponent();
|
||||
this.mobileComponent.transparentEventList = false;
|
||||
this.mobileComponent.showEventList = true;
|
||||
}
|
||||
}
|
||||
|
||||
EditApproveEventDismiss(){
|
||||
|
||||
@@ -170,13 +170,14 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="middle-content">
|
||||
<div *ngIf="postEvent.Body.Text">
|
||||
<h5>Detalhes</h5>
|
||||
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" ></ion-textarea>
|
||||
</ion-item>
|
||||
<div class="line"></div>
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2 d-flex width-100">
|
||||
<div class="ion-icon-class d-flex">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height width-100 flex-grow-1">
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content id="main-content">
|
||||
<div class="main-content d-flex height-100">
|
||||
<div *ngIf="loadedEvent" class="content d-flex flex-column width-100">
|
||||
<ion-content id="main-content" >
|
||||
<div class="main-content d-flex height-100" *ngIf="loadedEvent" >
|
||||
<div class="content d-flex flex-column width-100" *ngIf="loadedEvent.workflowInstanceDataFields">
|
||||
<div class="header-content width-100 d-flex justify-space-between">
|
||||
<div (click)="goBack()" class="header-icon-left cursor-pointer">
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-title flex-grow-1 cursor-pointer">
|
||||
<div class="header-title flex-grow-1 cursor-pointer" *ngIf="loadedEvent.workflowInstanceDataFields.Subject">
|
||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
||||
</div>
|
||||
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-true">
|
||||
@@ -73,7 +73,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="loadedEvent" class="aside-right flex-column height-100">
|
||||
<div class="aside-buttons">
|
||||
<button hidden full class="btn-ok" shape="round" >Editar evento</button>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { AnimationController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
@@ -9,8 +9,6 @@ import { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/
|
||||
import { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popover/event-actions-popover.page';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.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 { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
@@ -20,8 +18,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
})
|
||||
export class ApproveEventPage implements OnInit {
|
||||
event: Event;
|
||||
loadedEvent:any;
|
||||
loadedEvent1:any;
|
||||
loadedEvent:any = false
|
||||
loadedAttachments:any;
|
||||
customDate:any;
|
||||
today:any;
|
||||
@@ -51,7 +48,6 @@ export class ApproveEventPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
@@ -260,9 +256,7 @@ export class ApproveEventPage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
|
||||
|
||||
async editar(serialNumber: string) {
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EditEventToApproveComponent,
|
||||
@@ -282,7 +276,4 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ApproveEventModalPage } from './approve-event-modal/approve-event-modal.page';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -13,11 +12,13 @@ import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angula
|
||||
styleUrls: ['./event-list.page.scss'],
|
||||
})
|
||||
export class EventListPage implements OnInit {
|
||||
// [desktop] event list to approve
|
||||
|
||||
profile:string;
|
||||
segment:string;
|
||||
showLoader: boolean;
|
||||
eventsPRList: any;
|
||||
eventsMDGPRList: any;
|
||||
eventsPRList: any = []
|
||||
eventsMDGPRList: any = []
|
||||
eventPerson: EventPerson;
|
||||
eventBody: EventBody;
|
||||
categories: string[];
|
||||
@@ -27,8 +28,7 @@ export class EventListPage implements OnInit {
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -18,6 +18,7 @@ import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { ViewPublicationsPage } from '../view-publications/view-publications.page';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-publication',
|
||||
@@ -52,6 +53,7 @@ export class NewPublicationPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private publications: PublicationsService,
|
||||
private camera: Camera,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
@@ -112,7 +114,7 @@ export class NewPublicationPage implements OnInit {
|
||||
if(this.publicationType == '3'){
|
||||
console.log(this.navParams.get('publication'));
|
||||
|
||||
if(this.capturedImage != ''){
|
||||
if(this.capturedImage != '') {
|
||||
this.publication = {
|
||||
DateIndex: this.publication.DateIndex,
|
||||
DocumentId:this.publication.DocumentId,
|
||||
@@ -124,10 +126,18 @@ export class NewPublicationPage implements OnInit {
|
||||
FileBase64: this.capturedImage,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
console.log('Edit change image');
|
||||
console.log(this.publication);
|
||||
this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise();
|
||||
this.close();
|
||||
|
||||
try {
|
||||
console.log(this.publication);
|
||||
|
||||
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.toastService.successMessage("Publicação criado")
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest("Publicação não criado")
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
this.publication = {
|
||||
@@ -141,10 +151,18 @@ export class NewPublicationPage implements OnInit {
|
||||
FileBase64: this.publication.FileBase64,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
console.log('Edit - keep image');
|
||||
console.log(this.publication);
|
||||
this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise();
|
||||
this.close();
|
||||
/* console.log('Edit - keep image');
|
||||
console.log(this.publication); */
|
||||
try {
|
||||
console.log(this.publication);
|
||||
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.toastService.successMessage("Publicação criado")
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest("Publicação não criado")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
@@ -164,6 +182,19 @@ export class NewPublicationPage implements OnInit {
|
||||
console.log(this.publication); */
|
||||
this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||
this.close();
|
||||
|
||||
|
||||
try {
|
||||
console.log(this.publication);
|
||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise()
|
||||
this.toastService.successMessage("Publicação criado")
|
||||
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest("Publicação não criado")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,13 +208,13 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedImage = '';
|
||||
}
|
||||
setTitle(){
|
||||
if(this.publicationType == '1'){
|
||||
if(this.publicationType == '1') {
|
||||
this.publicationTitle = 'Nova Publicação Rápida';
|
||||
}
|
||||
else if(this.publicationType == '2'){
|
||||
else if(this.publicationType == '2') {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
}
|
||||
else if(this.publicationType == '3'){
|
||||
else if(this.publicationType == '3') {
|
||||
this.publicationTitle = 'Editar Publicação';
|
||||
this.pub = this.navParams.get('publication');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user