mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Melhorias
Alterar a ordem de apresentação do pop up sobre a recorrencia - Apresentar logo após o click no botão de edição do evento; A app não envia o comentario na revisão de eventos; Ao remover a recorrência do evento a app não remove os eventos da Agenda
This commit is contained in:
@@ -50,8 +50,6 @@ export class ApproveEventPage implements OnInit {
|
||||
constructor(
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private processes: ProcessesService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private popoverController: PopoverController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
@@ -150,7 +148,7 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
try {
|
||||
/* await this.processes.PostTaskAction(body).toPromise() */
|
||||
this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Declined').subscribe((value) => {
|
||||
this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Declined', "").subscribe((value) => {
|
||||
this.httpErroHandle.httpsSucessMessagge('Rejeitar');
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
}, ((error) => {
|
||||
@@ -240,7 +238,7 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
try {
|
||||
/* await this.processes.PostTaskAction(body).toPromise(); */
|
||||
this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Revision').subscribe((value) => {
|
||||
this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Revision', res.data.note).subscribe((value) => {
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.close();
|
||||
|
||||
@@ -390,7 +390,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
const calendar = await this.agendaDataRepository.getCalendarByUserId((this.eventProcess as any).owner.wxUserId)
|
||||
if(calendar.isOk()) {
|
||||
|
||||
this.agendaDataRepository.updateEvent(this.eventProcess.serialNumber, event, false, calendar.value, tracing).subscribe((value) => {
|
||||
this.agendaDataRepository.updateEvent(this.eventProcess.serialNumber, event, true, calendar.value, tracing).subscribe((value) => {
|
||||
console.log(value)
|
||||
this.close()
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
|
||||
@@ -179,11 +179,20 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="_postEvent.EventRecurrence.frequency == 'weekly'" class="container-div ion-item-class-2 d-flex pl-45 pb-20 justify-content-between">
|
||||
<div class="days-to-select">Seg</div>
|
||||
<div class="days-to-select">Ter</div>
|
||||
<div class="days-to-select">Qua</div>
|
||||
<div class="days-to-select">Qui</div>
|
||||
<div class="days-to-select">Sex</div>
|
||||
<div class="days-to-select">Sab</div>
|
||||
<div class="days-to-select">Dom</div>
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="_postEvent.EventRecurrence.frequency != 'never'" class="container-div">
|
||||
<div class="ion-item-class-2 d-flex" >
|
||||
<div class="ion-icon-class">
|
||||
@@ -423,7 +432,7 @@
|
||||
<ion-footer class="ion-no-border">
|
||||
<ion-toolbar class="width-100 d-flex justify-space-between px-20">
|
||||
<ion-buttons slot="start">
|
||||
<button class="btn-ok" fill="clear" color="#fff" (click)="validationEditAllEvent()">
|
||||
<button class="btn-ok" fill="clear" color="#fff" (click)="save_v2()">
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
|
||||
@@ -17,7 +17,7 @@ ion-content{
|
||||
padding: 30px 20px 0px 20px;
|
||||
color:#000;
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
padding: 0 !important;
|
||||
@@ -90,7 +90,7 @@ ion-content{
|
||||
.list-people{
|
||||
|
||||
float: left;
|
||||
|
||||
|
||||
}
|
||||
.add-people{
|
||||
width: rem(45);
|
||||
@@ -149,7 +149,7 @@ ion-content{
|
||||
--color:#ffffff;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
|
||||
.text-input{
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
@@ -157,7 +157,7 @@ ion-content{
|
||||
padding: 0 !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* Error Messages */
|
||||
.error{
|
||||
color:red;
|
||||
@@ -171,7 +171,7 @@ ion-content{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.app-name{
|
||||
background: var(--title-text-color);
|
||||
border-radius: 18px;
|
||||
@@ -211,4 +211,23 @@ ion-content{
|
||||
|
||||
.materia-top {
|
||||
padding-top: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.days-to-select{
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #ebebeb;
|
||||
border-radius: 50px;
|
||||
box-shadow: 0px 0px 10px #f9f9f9;
|
||||
border: 1px solid #d1d1d1;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
-webkit-border-radius: 50px;
|
||||
-moz-border-radius: 50px;
|
||||
-ms-border-radius: 50px;
|
||||
-o-border-radius: 50px;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import { TableSharedCalendar } from 'src/app/services/Repositorys/Agenda/agenda-
|
||||
import { RoleIdService } from 'src/app/services/role-id.service'
|
||||
import { XTracerAsync, TracingType } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
import { AttendeesLIstChangeDetector } from 'src/app/services/Repositorys/Agenda/async/change/attendeesLIstChangeDetector';
|
||||
import { EventRecurrenceComponentReturn, EventRecurrencePage } from 'src/app/modals/event-recurrence/event-recurrence.page';
|
||||
@Component({
|
||||
selector: 'app-edit-event',
|
||||
templateUrl: './edit-event.page.html',
|
||||
@@ -105,6 +106,7 @@ export class EditEventPage implements OnInit {
|
||||
CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
|
||||
dateDifference = 0
|
||||
editAllEvent = false
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -118,6 +120,8 @@ export class EditEventPage implements OnInit {
|
||||
public RoleIdService: RoleIdService,
|
||||
) {
|
||||
this.sharedCalendar = this.agendaDataRepository.getShareCalendarItemsLiveWithOrder()
|
||||
|
||||
|
||||
}
|
||||
|
||||
hasPrCalendar(data: TableSharedCalendar[]) {
|
||||
@@ -148,6 +152,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
this.allDayCheck = this.postEvent.IsAllDayEvent;
|
||||
if (!this.restoreTemporaryData()) {
|
||||
this.validationEditAllEvent()
|
||||
// clear
|
||||
|
||||
if (this._postEvent) {
|
||||
@@ -366,50 +371,37 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
validationEditAllEvent() {
|
||||
async validationEditAllEvent() {
|
||||
|
||||
if (this.postEvent.IsRecurring ) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EventRecurrencePage,
|
||||
componentProps: {},
|
||||
cssClass: 'event-recurrence-modal',
|
||||
|
||||
if (this.postEvent.IsRecurring && this._postEvent.EventRecurrence.frequency != 'never') {
|
||||
this.alertController.create({
|
||||
header: 'Editar evento?',
|
||||
message: 'Este evento tem recorrência, deseja editar a Sequência de eventos?',
|
||||
inputs: [
|
||||
{
|
||||
name: 'confirm',
|
||||
type: 'checkbox',
|
||||
label: '',
|
||||
value: 'confirm',
|
||||
checked: false
|
||||
}
|
||||
],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Sim',
|
||||
handler: (data) => {
|
||||
// Check if the checkbox is checked
|
||||
if (data.includes('confirm')) {
|
||||
this.save_v2(true)
|
||||
} else {
|
||||
this.save_v2(false)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Não',
|
||||
handler: () => {
|
||||
this.save_v2(false)
|
||||
}
|
||||
}
|
||||
]
|
||||
}).then(res => {
|
||||
res.present();
|
||||
});
|
||||
} else {
|
||||
this.save_v2(false)
|
||||
|
||||
modal.onDidDismiss().then((res) => {
|
||||
|
||||
const data: EventRecurrenceComponentReturn = res.data
|
||||
if(data =='EditAll') {
|
||||
this.editAllEvent = true
|
||||
} else if (data == 'EditOne') {
|
||||
this.editAllEvent = false
|
||||
} else if(data == 'Cancel') {
|
||||
this.close()
|
||||
} else {
|
||||
this.close()
|
||||
}
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@XTracerAsync({name:'desktop/edit-event', bugPrint: true, daley: 4000})
|
||||
async save_v2(editAllEvent, tracing?: TracingType) {
|
||||
async save_v2(tracing?: TracingType) {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
@@ -429,7 +421,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
if(calendar.isOk()) {
|
||||
this.showLoader = true;
|
||||
this.agendaDataRepository.updateEvent(this._postEvent.EventId, this._postEvent, editAllEvent, calendar.value, tracing).subscribe((value) => {
|
||||
this.agendaDataRepository.updateEvent(this._postEvent.EventId, this._postEvent, this.editAllEvent, calendar.value, tracing).subscribe((value) => {
|
||||
console.log(value)
|
||||
|
||||
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
||||
|
||||
@@ -12,7 +12,6 @@ import { SearchList } from 'src/app/models/search-document';
|
||||
import { FileService } from 'src/app/services/functions/file.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
||||
import { MessageService } from 'src/app/services/chat/message.service';
|
||||
@@ -175,28 +174,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
} catch (err) { }
|
||||
}
|
||||
|
||||
// async goToEvent(event: any) {
|
||||
// let classs;
|
||||
// if (window.innerWidth < 701) {
|
||||
// classs = 'modal modal-desktop'
|
||||
// } else {
|
||||
// classs = 'modal modal-desktop showAsideOptions'
|
||||
// }
|
||||
|
||||
// const modal = await this.modalController.create({
|
||||
// component: ViewEventPage,
|
||||
// componentProps: {
|
||||
// eventId: event.id,
|
||||
// CalendarId: event.calendarId
|
||||
// },
|
||||
// cssClass: classs,
|
||||
// });
|
||||
|
||||
// modal.onDidDismiss().then((res) => {
|
||||
|
||||
// });
|
||||
// await modal.present();
|
||||
// }
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
|
||||
@@ -392,27 +392,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
return this.timeService.showDateDuration(start);
|
||||
}
|
||||
|
||||
// async goToEvent(event: any) {
|
||||
// let classs;
|
||||
// if (window.innerWidth < 701) {
|
||||
// classs = 'modal modal-desktop'
|
||||
// } else {
|
||||
// classs = 'modal modal-desktop showAsideOptions'
|
||||
// }
|
||||
// const modal = await this.modalController.create({
|
||||
// component: ViewEventPage,
|
||||
// componentProps: {
|
||||
// eventId: event.id,
|
||||
// CalendarId: event.calendarId
|
||||
// },
|
||||
// cssClass: classs,
|
||||
// });
|
||||
|
||||
// modal.onDidDismiss().then((res) => {
|
||||
|
||||
// });
|
||||
// await modal.present();
|
||||
// }
|
||||
|
||||
sendMessage() {
|
||||
this.ChatSystemService.getDmRoom(this.roomId).send({})
|
||||
|
||||
@@ -6,12 +6,8 @@ import { SearchList } from 'src/app/models/search-document';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Event, EventToApproveEdit } from '../../../models/event.model';
|
||||
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
@@ -320,7 +316,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
const calendar = await this.agendaDataRepository.getCalendarByUserId((this.eventProcess as any).owner.wxUserId)
|
||||
|
||||
if(calendar.isOk()) {
|
||||
this.agendaDataRepository.updateEvent(this.eventProcess.serialNumber, event,false, calendar.value, tracing).subscribe((value) => {
|
||||
this.agendaDataRepository.updateEvent(this.eventProcess.serialNumber, event, true, calendar.value, tracing).subscribe((value) => {
|
||||
console.log(value)
|
||||
this.httpErroHalde.httpsSucessMessagge('Editar evento')
|
||||
window['approve-event-getTask']()
|
||||
@@ -382,40 +378,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* this.loadedAttachments.forEach((document:any)=>{
|
||||
if(document['action'] == 'add') {
|
||||
delete document.action
|
||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
||||
window['approve-event-getTask'] ()
|
||||
// this.toastService._successMessage();
|
||||
}, error =>{
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest();
|
||||
}
|
||||
});
|
||||
} else if(document['action'] == 'delete') {
|
||||
delete document.action
|
||||
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
||||
window['approve-event-getTask'] ()
|
||||
// this.toastService._successMessage()
|
||||
}, error =>{
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}) */
|
||||
|
||||
}
|
||||
|
||||
async openAttendees() {
|
||||
|
||||
Reference in New Issue
Block a user