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:
Peter Maquiran
2024-07-02 14:15:06 +01:00
parent f0402a1e5b
commit fea0279ad7
199 changed files with 40665 additions and 164593 deletions
@@ -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')