mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Hot fix
This commit is contained in:
@@ -148,10 +148,13 @@ const routes = [
|
||||
path: 'edit-action',
|
||||
loadChildren: () => import('./shared/publication/edit-action/edit-action.module').then( m => m.EditActionPageModule)
|
||||
},
|
||||
{
|
||||
path: 'eliminate-event',
|
||||
loadChildren: () => import('./modals/eliminate-event/eliminate-event.module').then( m => m.EliminateEventPageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
/* {
|
||||
/*
|
||||
path: 'chat',
|
||||
component: ChatPage
|
||||
} */
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { AuthGuard } from '../guards/auth.guard';
|
||||
import { HomeGuard } from '../guards/home.guard';
|
||||
import { LoginGuard } from '../guards/login.guard';
|
||||
import { GroupMessagesPage } from '../pages/chat/group-messages/group-messages.page';
|
||||
import { MessagesPage } from '../pages/chat/messages/messages.page';
|
||||
import { PendentesResolverService } from '../resolvers/pendentes-resolver.service';
|
||||
import { ProcessesResolverService } from '../resolvers/processes-resolver.service';
|
||||
import { UserDataResolver } from '../resolvers/userData.resolver';
|
||||
import { DiplomasPage } from '../shared/gabinete-digital/diplomas/diplomas.page';
|
||||
|
||||
import { HomePage } from './home.page';
|
||||
|
||||
const routes: Routes = [
|
||||
@@ -267,8 +259,6 @@ const routes: Routes = [
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
path: 'search',
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { EliminateEventPage } from './eliminate-event.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: EliminateEventPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class EliminateEventPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EliminateEventPageRoutingModule } from './eliminate-event-routing.module';
|
||||
|
||||
import { EliminateEventPage } from './eliminate-event.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
EliminateEventPageRoutingModule
|
||||
],
|
||||
declarations: [EliminateEventPage]
|
||||
})
|
||||
export class EliminateEventPageModule {}
|
||||
@@ -0,0 +1,19 @@
|
||||
<ion-header class="ion-no-border">
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="header-content width-100">
|
||||
<div class="header-title d-flex width-100">
|
||||
<h3>Deseja retirar este expediente da sua caixa de correspondência?</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-body width-100">
|
||||
<p>Nota: Ao efectuar esta operação, o tratamento deste expediente não poderá ser realizado a partir da caixa de correspondência</p>
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="buttons width-100">
|
||||
<button class="btn-ok-medium" shape="round" (click)="close()">Não</button>
|
||||
<button class="btn-delete-medium" shape="round" (click)="save()">Sim</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@@ -0,0 +1,27 @@
|
||||
ion-content{
|
||||
--padding-top:15px;
|
||||
--padding-start: 15px;
|
||||
--padding-end: 15px;
|
||||
}
|
||||
.header-content{
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.header-title{
|
||||
font-family: Roboto;
|
||||
font-size: 20px;
|
||||
color:#000;
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
.header-body{
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 15px 0 15px 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EliminateEventPage } from './eliminate-event.page';
|
||||
|
||||
describe('EliminateEventPage', () => {
|
||||
let component: EliminateEventPage;
|
||||
let fixture: ComponentFixture<EliminateEventPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EliminateEventPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EliminateEventPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-eliminate-event',
|
||||
templateUrl: './eliminate-event.page.html',
|
||||
styleUrls: ['./eliminate-event.page.scss'],
|
||||
})
|
||||
export class EliminateEventPage implements OnInit {
|
||||
|
||||
constructor(private modalController: ModalController,) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss('No');
|
||||
}
|
||||
|
||||
save(){
|
||||
this.modalController.dismiss('Yes');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
export class EventRecurrence{
|
||||
Type: string;
|
||||
export class EventRecurrence {
|
||||
Type: string | number;
|
||||
Day?: number;
|
||||
DayOfWeek?:number;
|
||||
Month?: number;
|
||||
|
||||
@@ -14,6 +14,7 @@ import { BookMeetingModalPage } from '../../gabinete-digital/expediente/book-mee
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -143,6 +144,34 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async OpenDeleteEventModal() {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EliminateEventPage,
|
||||
componentProps: {
|
||||
eventId: this.loadedEvent.EventId,
|
||||
caller: this.caller,
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
if(res){
|
||||
setTimeout(() => {
|
||||
/* this.loadEvent(); */
|
||||
this.loadEvent()
|
||||
this.getAttachments();
|
||||
}, 250);
|
||||
this.isEventEdited = true;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
getAttachments() {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
|
||||
@@ -182,6 +182,11 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
injectValidation() {
|
||||
|
||||
if (typeof(this.postEvent.EventRecurrence.Type) == 'number') {
|
||||
const str: any = this.postEvent.EventRecurrence.Type.toString()
|
||||
this.postEvent.EventRecurrence.Type = str
|
||||
}
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postEvent.Subject, [
|
||||
Validators.required,
|
||||
|
||||
@@ -24,6 +24,7 @@ import { ThemePalette } from '@angular/material/core';
|
||||
import { NgZone, ViewChild } from '@angular/core';
|
||||
import { FormGroup, Validators } from '@angular/forms';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
|
||||
@@ -227,6 +228,11 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
injectValidation() {
|
||||
|
||||
if (typeof(this.postEvent.EventRecurrence.Type) == 'number') {
|
||||
const str: any = this.postEvent.EventRecurrence.Type.toString()
|
||||
this.postEvent.EventRecurrence.Type = str
|
||||
}
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postEvent.Subject, [
|
||||
Validators.required,
|
||||
@@ -340,6 +346,8 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
async save() {
|
||||
|
||||
this.injectValidation()
|
||||
|
||||
@@ -13,6 +13,7 @@ import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/
|
||||
import { ChatPopoverPage } from '../../popover/chat-popover/chat-popover.page';
|
||||
import { OptsExpedientePage } from '../../popover/opts-expediente/opts-expediente.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -109,12 +110,32 @@ export class ViewEventPage implements OnInit {
|
||||
;
|
||||
}
|
||||
|
||||
deleteEvent(){
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
{
|
||||
async deleteEvent(){
|
||||
|
||||
if (this.loadedEvent.IsRecurring) {
|
||||
|
||||
} else {
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () => {
|
||||
this.toastService.successMessage('Evento apagado');
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async deleteRecurringEvent() {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EliminateEventPage,
|
||||
componentProps: {},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
getAttachments(eventId){
|
||||
|
||||
Reference in New Issue
Block a user