mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
create weakly event
This commit is contained in:
@@ -153,23 +153,6 @@ registerLocaleData(localePt, 'pt');
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
export const increment = createAction('[Counter Component] Increment');
|
|
||||||
export const decrement = createAction('[Counter Component] Decrement');
|
|
||||||
export const reset = createAction('[Counter Component] Reset');
|
|
||||||
|
|
||||||
export const initialState = 0;
|
|
||||||
|
|
||||||
const _counterReducer = createReducer(
|
|
||||||
initialState,
|
|
||||||
on(increment, (state) => state + 1),
|
|
||||||
on(decrement, (state) => state - 1),
|
|
||||||
on(reset, (state) => 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
export function counterReducer(state, action) {
|
|
||||||
return _counterReducer(state, action);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent, PopupQuestionPipe, InputFilterDirective],
|
declarations: [AppComponent, PopupQuestionPipe, InputFilterDirective],
|
||||||
imports: [BrowserModule,
|
imports: [BrowserModule,
|
||||||
|
|||||||
@@ -55,5 +55,7 @@ export class EventSetDefaultParticipantsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return ok(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,10 +102,10 @@ export class RoomSetLastMessageService {
|
|||||||
} else {
|
} else {
|
||||||
console.log('set last message')
|
console.log('set last message')
|
||||||
}
|
}
|
||||||
} else if (findRoom.isOk() && !findRoom.value && e.payload.receiverId) {
|
} else if (findRoom.isOk() && !findRoom.value && e.payload?.receiverId) {
|
||||||
// console.log('new room', e)
|
// console.log('new room', e)
|
||||||
const findLocalDirectRoom = await this.roomLocalRepository.findOne({
|
const findLocalDirectRoom = await this.roomLocalRepository.findOne({
|
||||||
receiverId: e.payload.receiverId
|
receiverId: e.payload?.receiverId
|
||||||
})
|
})
|
||||||
|
|
||||||
if(findLocalDirectRoom.isOk() && findLocalDirectRoom.value) {
|
if(findLocalDirectRoom.isOk() && findLocalDirectRoom.value) {
|
||||||
|
|||||||
@@ -159,7 +159,7 @@
|
|||||||
Diário
|
Diário
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="weekly">
|
<mat-option value="weekly">
|
||||||
Semanalmente
|
Semanal
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="monthly">
|
<mat-option value="monthly">
|
||||||
Mensal
|
Mensal
|
||||||
@@ -175,6 +175,20 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-div py-2" *ngIf="postData.EventRecurrence.frequency == 'weekly' || postData.EventRecurrence.frequency == 'monthly'">
|
||||||
|
<div class="ion-item-class-2 d-flex justify-content-around font-13-em">
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.mon" (click)="daysOfWeek.mon=!daysOfWeek.mon">Seg</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.tues" (click)="daysOfWeek.tues=!daysOfWeek.tues">Terça</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.wed" (click)="daysOfWeek.wed=!daysOfWeek.wed">quarta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.thurs" (click)="daysOfWeek.thurs=!daysOfWeek.thurs">quinta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.fri" (click)="daysOfWeek.fri=!daysOfWeek.fri">Sexta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sat" (click)="daysOfWeek.sat=!daysOfWeek.sat">Sabado</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sun" (click)="daysOfWeek.sun=!daysOfWeek.sun">Domingo</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="postData.EventRecurrence.frequency != 'never'" class="container-div">
|
<div *ngIf="postData.EventRecurrence.frequency != 'never'" class="container-div">
|
||||||
<div class="ion-item-class-2 d-flex" >
|
<div class="ion-item-class-2 d-flex" >
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
|
|||||||
@@ -212,3 +212,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.segment{
|
||||||
|
box-shadow: 0px 0px 10px #b3b3b3;
|
||||||
|
padding: 3px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.segment-active {
|
||||||
|
background-color: rgb(212, 212, 212);
|
||||||
|
}
|
||||||
|
|||||||
@@ -115,6 +115,17 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
|
|
||||||
CalendarNamesOptions = ['Oficial', 'Pessoal']
|
CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||||
|
|
||||||
|
daysOfWeek = {
|
||||||
|
sun: false,
|
||||||
|
mon: false,
|
||||||
|
tues: false,
|
||||||
|
wed: false,
|
||||||
|
thurs: false,
|
||||||
|
fri: false,
|
||||||
|
sat: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@@ -363,6 +374,20 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
|||||||
if (this.Form.invalid) return false
|
if (this.Form.invalid) return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let i =0;
|
||||||
|
this.postData.EventRecurrence.daysOfWeek = []
|
||||||
|
for(const [key, value] of Object.entries(this.daysOfWeek)) {
|
||||||
|
if(value) {
|
||||||
|
if(!this.postData.EventRecurrence.daysOfWeek.includes(i)) {
|
||||||
|
this.postData.EventRecurrence.daysOfWeek.push(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.postData.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
this.postData.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||||
|
|
||||||
const laoder = this.toastService.loading();
|
const laoder = this.toastService.loading();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { EventPerson } from './eventperson.model';
|
|||||||
export interface EventRecurrence {
|
export interface EventRecurrence {
|
||||||
Type?: number | string;
|
Type?: number | string;
|
||||||
Day?: number;
|
Day?: number;
|
||||||
DayOfWeek?: number;
|
daysOfWeek?: number[];
|
||||||
Month?: number | string;
|
Month?: number | string;
|
||||||
LastOccurrence?: Date | string;
|
LastOccurrence?: Date | string;
|
||||||
frequency?: string,
|
frequency?: string,
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ const OrganizerSchema = z.object({
|
|||||||
const EventRecurrenceSchema = z.object({
|
const EventRecurrenceSchema = z.object({
|
||||||
Type: z.number().optional(),
|
Type: z.number().optional(),
|
||||||
Day: z.any().optional(),
|
Day: z.any().optional(),
|
||||||
DayOfWeek: z.any(),
|
daysOfWeek: z.object({
|
||||||
|
day: z.number()
|
||||||
|
}).array(),
|
||||||
Month: z.any(),
|
Month: z.any(),
|
||||||
LastOccurrence: z.any().optional(),
|
LastOccurrence: z.any().optional(),
|
||||||
frequency: z.number().optional(),
|
frequency: z.number().optional(),
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ export class AgendaDataRepositoryService {
|
|||||||
recurrence: {
|
recurrence: {
|
||||||
frequency: this.utils.eventRecurence(eventData.EventRecurrence.frequency),
|
frequency: this.utils.eventRecurence(eventData.EventRecurrence.frequency),
|
||||||
until:((eventData.EventRecurrence.until === "") ? this.utils.addOneHourToIsoString(eventData.EndDate.toISOString()) : eventData.EventRecurrence.until),
|
until:((eventData.EventRecurrence.until === "") ? this.utils.addOneHourToIsoString(eventData.EndDate.toISOString()) : eventData.EventRecurrence.until),
|
||||||
|
daysOfWeek: eventData.EventRecurrence.daysOfWeek || []
|
||||||
},
|
},
|
||||||
organizerId: SessionStore.user.UserId,
|
organizerId: SessionStore.user.UserId,
|
||||||
isAllDayEvent: eventData.IsAllDayEvent,
|
isAllDayEvent: eventData.IsAllDayEvent,
|
||||||
@@ -211,6 +212,7 @@ export class AgendaDataRepositoryService {
|
|||||||
recurrence: {
|
recurrence: {
|
||||||
frequency: this.utils.eventRecurence(eventData.EventRecurrence.frequency),
|
frequency: this.utils.eventRecurence(eventData.EventRecurrence.frequency),
|
||||||
until: ((eventData.EventRecurrence.until === "") ? this.utils.addOneHourToIsoString(eventData.EndDate.toISOString()) : eventData.EventRecurrence.until),
|
until: ((eventData.EventRecurrence.until === "") ? this.utils.addOneHourToIsoString(eventData.EndDate.toISOString()) : eventData.EventRecurrence.until),
|
||||||
|
daysOfWeek: eventData.EventRecurrence.daysOfWeek || []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export class EventMapper {
|
|||||||
"EventRecurrence": {
|
"EventRecurrence": {
|
||||||
"Type": -1,
|
"Type": -1,
|
||||||
"Day": null,
|
"Day": null,
|
||||||
"DayOfWeek": null,
|
"daysOfWeek": dto.eventRecurrence?.daysOfWeek.map(e => e.day),
|
||||||
"Month": null,
|
"Month": null,
|
||||||
"LastOccurrence": null,
|
"LastOccurrence": null,
|
||||||
"frequency": dto?.eventRecurrence?.frequency,
|
"frequency": dto?.eventRecurrence?.frequency,
|
||||||
|
|||||||
+14
-1
@@ -144,7 +144,7 @@
|
|||||||
Diário
|
Diário
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="weekly">
|
<mat-option value="weekly">
|
||||||
Semanalmente
|
Semanal
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="monthly">
|
<mat-option value="monthly">
|
||||||
Mensal
|
Mensal
|
||||||
@@ -159,6 +159,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-div py-2" *ngIf="postData.EventRecurrence.frequency == 'weekly' || postData.EventRecurrence.frequency == 'monthly'">
|
||||||
|
<div class="ion-item-class-2 d-flex justify-content-around font-13-em">
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.mon" (click)="daysOfWeek.mon=!daysOfWeek.mon">Seg</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.tues" (click)="daysOfWeek.tues=!daysOfWeek.tues">Terça</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.wed" (click)="daysOfWeek.wed=!daysOfWeek.wed">quarta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.thurs" (click)="daysOfWeek.thurs=!daysOfWeek.thurs">quinta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.fri" (click)="daysOfWeek.fri=!daysOfWeek.fri">Sexta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sat" (click)="daysOfWeek.sat=!daysOfWeek.sat">Sabado</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sun" (click)="daysOfWeek.sun=!daysOfWeek.sun">Domingo</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div *ngIf="postData.EventRecurrence.frequency != 'never'" class="container-div">
|
<div *ngIf="postData.EventRecurrence.frequency != 'never'" class="container-div">
|
||||||
|
|
||||||
<div class="ion-item-class-2 d-flex" >
|
<div class="ion-item-class-2 d-flex" >
|
||||||
|
|||||||
+11
@@ -209,3 +209,14 @@
|
|||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.segment{
|
||||||
|
box-shadow: 0px 0px 10px #b3b3b3;
|
||||||
|
padding: 3px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.segment-active {
|
||||||
|
background-color: rgb(212, 212, 212);
|
||||||
|
}
|
||||||
|
|||||||
+21
@@ -122,6 +122,15 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
CalendarNameShow = true
|
CalendarNameShow = true
|
||||||
eventRecurence = 'never';
|
eventRecurence = 'never';
|
||||||
|
|
||||||
|
daysOfWeek = {
|
||||||
|
sun: false,
|
||||||
|
mon: false,
|
||||||
|
tues: false,
|
||||||
|
wed: false,
|
||||||
|
thurs: false,
|
||||||
|
fri: false,
|
||||||
|
sat: false,
|
||||||
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -393,6 +402,18 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let i =0;
|
||||||
|
this.postData.EventRecurrence.daysOfWeek = []
|
||||||
|
for(const [key, value] of Object.entries(this.daysOfWeek)) {
|
||||||
|
if(value) {
|
||||||
|
if(!this.postData.EventRecurrence.daysOfWeek.includes(i)) {
|
||||||
|
this.postData.EventRecurrence.daysOfWeek.push(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.postData.Attachments = DocumentToSave as any;
|
this.postData.Attachments = DocumentToSave as any;
|
||||||
let loader = this.toastService.loading();
|
let loader = this.toastService.loading();
|
||||||
|
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ export class TaskService {
|
|||||||
@XTracerAsync({name:'taskService/loadEventToAprove', bugPrint: true})
|
@XTracerAsync({name:'taskService/loadEventToAprove', bugPrint: true})
|
||||||
async loadEventosParaAprovacao(tracing?: TracingType) {
|
async loadEventosParaAprovacao(tracing?: TracingType) {
|
||||||
this.showLoaderNum++
|
this.showLoaderNum++
|
||||||
console.log('PR')
|
// console.log('PR')
|
||||||
// PR dont have event to approve
|
// PR dont have event to approve
|
||||||
/* if(this.SessionStore.user.Profile != 'PR') { */
|
/* if(this.SessionStore.user.Profile != 'PR') { */
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
Diário
|
Diário
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="weekly">
|
<mat-option value="weekly">
|
||||||
Semanalmente
|
Semanal
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="monthly">
|
<mat-option value="monthly">
|
||||||
Mensal
|
Mensal
|
||||||
@@ -183,6 +183,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-div" *ngIf="_postEvent.EventRecurrence.frequency == 'weekly' || _postEvent.EventRecurrence.frequency == 'monthly'">
|
||||||
|
<div class="ion-item-class-2 d-flex justify-content-around font-13-em">
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.mon" (click)="daysOfWeek.mon=!daysOfWeek.mon">Seg</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.tues" (click)="daysOfWeek.tues=!daysOfWeek.tues">Terça</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.wed" (click)="daysOfWeek.wed=!daysOfWeek.wed">quarta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.thurs" (click)="daysOfWeek.thurs=!daysOfWeek.thurs">quinta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.fri" (click)="daysOfWeek.fri=!daysOfWeek.fri">Sexta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sat" (click)="daysOfWeek.sat=!daysOfWeek.sat">Sabado</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sun" (click)="daysOfWeek.sun=!daysOfWeek.sun">Domingo</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 *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">Seg</div>
|
||||||
<div class="days-to-select">Ter</div>
|
<div class="days-to-select">Ter</div>
|
||||||
|
|||||||
@@ -231,3 +231,15 @@ ion-content{
|
|||||||
-ms-border-radius: 50px;
|
-ms-border-radius: 50px;
|
||||||
-o-border-radius: 50px;
|
-o-border-radius: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.segment{
|
||||||
|
box-shadow: 0px 0px 10px #b3b3b3;
|
||||||
|
padding: 3px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.segment-active {
|
||||||
|
background-color: rgb(212, 212, 212);
|
||||||
|
}
|
||||||
|
|||||||
@@ -105,6 +105,16 @@ export class EditEventPage implements OnInit {
|
|||||||
dateDifference = 0
|
dateDifference = 0
|
||||||
editAllEvent = false
|
editAllEvent = false
|
||||||
|
|
||||||
|
daysOfWeek = {
|
||||||
|
sun: false,
|
||||||
|
mon: false,
|
||||||
|
tues: false,
|
||||||
|
wed: false,
|
||||||
|
thurs: false,
|
||||||
|
fri: false,
|
||||||
|
sat: false,
|
||||||
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
@@ -181,7 +191,36 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
this.changeAgenda()
|
this.changeAgenda()
|
||||||
|
this.checkForWeekDaysSelect()
|
||||||
|
}
|
||||||
|
|
||||||
|
checkForWeekDaysSelect() {
|
||||||
|
|
||||||
|
if(!this._postEvent.EventRecurrence?.daysOfWeek) {
|
||||||
|
this._postEvent.EventRecurrence.daysOfWeek = []
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this._postEvent.EventRecurrence?.daysOfWeek.includes(0)) {
|
||||||
|
this.daysOfWeek.sun = true
|
||||||
|
}
|
||||||
|
if (this._postEvent.EventRecurrence?.daysOfWeek.includes(1)) {
|
||||||
|
this.daysOfWeek.mon = true
|
||||||
|
}
|
||||||
|
if (this._postEvent.EventRecurrence?.daysOfWeek.includes(2)) {
|
||||||
|
this.daysOfWeek.tues = true
|
||||||
|
}
|
||||||
|
if (this._postEvent.EventRecurrence?.daysOfWeek.includes(3)) {
|
||||||
|
this.daysOfWeek.wed = true
|
||||||
|
}
|
||||||
|
if (this._postEvent.EventRecurrence?.daysOfWeek.includes(4)) {
|
||||||
|
this.daysOfWeek.thurs = true
|
||||||
|
}
|
||||||
|
if (this._postEvent.EventRecurrence?.daysOfWeek.includes(5)) {
|
||||||
|
this.daysOfWeek.fri = true
|
||||||
|
}
|
||||||
|
if (this._postEvent.EventRecurrence?.daysOfWeek.includes(6)) {
|
||||||
|
this.daysOfWeek.sat = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -249,21 +288,6 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
openInicio() {
|
|
||||||
let input: any = document.querySelector('#new-inicio')
|
|
||||||
if (input) {
|
|
||||||
|
|
||||||
input.click()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
openFim() {
|
|
||||||
let input: any = document.querySelector('#new-fim')
|
|
||||||
if (input) {
|
|
||||||
input.click()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
openLastOccurrence() {
|
openLastOccurrence() {
|
||||||
let input: any = document.querySelector('#last-occurrence')
|
let input: any = document.querySelector('#last-occurrence')
|
||||||
if (input) {
|
if (input) {
|
||||||
@@ -383,6 +407,16 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let i =0;
|
||||||
|
this._postEvent.EventRecurrence.daysOfWeek = []
|
||||||
|
for(const [key, value] of Object.entries(this.daysOfWeek)) {
|
||||||
|
if(value) {
|
||||||
|
if(!this._postEvent.EventRecurrence.daysOfWeek.includes(i)) {
|
||||||
|
this._postEvent.EventRecurrence.daysOfWeek.push(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
|
||||||
const calendar = await this.agendaDataRepository.getCalendarByUserId(this.selectedUserCalendar)
|
const calendar = await this.agendaDataRepository.getCalendarByUserId(this.selectedUserCalendar)
|
||||||
|
|
||||||
@@ -535,6 +569,7 @@ export class EditEventPage implements OnInit {
|
|||||||
eventBody: this.eventBody,
|
eventBody: this.eventBody,
|
||||||
segment: this.segment,
|
segment: this.segment,
|
||||||
loadedEventAttachments: this.loadedEventAttachments,
|
loadedEventAttachments: this.loadedEventAttachments,
|
||||||
|
daysOfWeek: this.daysOfWeek
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,6 +582,7 @@ export class EditEventPage implements OnInit {
|
|||||||
this.eventBody = restoredData.eventBody
|
this.eventBody = restoredData.eventBody
|
||||||
this.segment = restoredData.segment
|
this.segment = restoredData.segment
|
||||||
this.loadedEventAttachments = restoredData.loadedEventAttachments
|
this.loadedEventAttachments = restoredData.loadedEventAttachments
|
||||||
|
this.daysOfWeek = restoredData.daysOfWeek
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ export class EventListPage implements OnInit {
|
|||||||
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
} else {
|
} else {
|
||||||
|
this.showLoader = false;
|
||||||
tracing.setAttribute('run', 'to early')
|
tracing.setAttribute('run', 'to early')
|
||||||
console.warn('calling to early eventlistpageshared/loadtoapproveevents')
|
console.warn('calling to early eventlistpageshared/loadtoapproveevents')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,7 +153,7 @@
|
|||||||
Diário
|
Diário
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="weekly">
|
<mat-option value="weekly">
|
||||||
Semanalmente
|
Semanal
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="monthly">
|
<mat-option value="monthly">
|
||||||
Mensal
|
Mensal
|
||||||
@@ -168,6 +168,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-div" *ngIf="postEvent.EventRecurrence.frequency == 'weekly' || postEvent.EventRecurrence.frequency == 'monthly'">
|
||||||
|
<div class="ion-item-class-2 d-flex justify-content-around font-13-em">
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.mon" (click)="daysOfWeek.mon=!daysOfWeek.mon">Seg</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.tues" (click)="daysOfWeek.tues=!daysOfWeek.tues">Terça</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.wed" (click)="daysOfWeek.wed=!daysOfWeek.wed">quarta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.thurs" (click)="daysOfWeek.thurs=!daysOfWeek.thurs">quinta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.fri" (click)="daysOfWeek.fri=!daysOfWeek.fri">Sexta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sat" (click)="daysOfWeek.sat=!daysOfWeek.sat">Sabado</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sun" (click)="daysOfWeek.sun=!daysOfWeek.sun">Domingo</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div *ngIf="postEvent.EventRecurrence.frequency != 'never'" class="container-div">
|
<div *ngIf="postEvent.EventRecurrence.frequency != 'never'" class="container-div">
|
||||||
<div class="ion-item-class-2 d-flex" >
|
<div class="ion-item-class-2 d-flex" >
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
|
|||||||
@@ -220,3 +220,13 @@ ion-content{
|
|||||||
padding-top: 7px;
|
padding-top: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.segment{
|
||||||
|
box-shadow: 0px 0px 10px #b3b3b3;
|
||||||
|
padding: 3px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.segment-active {
|
||||||
|
background-color: rgb(212, 212, 212);
|
||||||
|
}
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, OnInit, Input, Output, EventEmitter } 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 { Event } from 'src/app/models/event.model';
|
||||||
import { ModalController } from '@ionic/angular';
|
import { ModalController } from '@ionic/angular';
|
||||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||||
@@ -14,14 +12,12 @@ import * as _rollupMoment from 'moment';
|
|||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||||
import { ThemePalette } from '@angular/material/core';
|
import { ThemePalette } from '@angular/material/core';
|
||||||
import { ViewChild } from '@angular/core';
|
|
||||||
import { FormGroup, Validators } from '@angular/forms';
|
import { FormGroup, Validators } from '@angular/forms';
|
||||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
import { ThemeService } from 'src/app/services/theme.service'
|
import { ThemeService } from 'src/app/services/theme.service'
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { EventToAprove } from 'src/app/models/eventToAprove.model';
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { TaskService } from 'src/app/services/task.service'
|
import { TaskService } from 'src/app/services/task.service'
|
||||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||||
@@ -29,7 +25,6 @@ import { AgendaDataRepositoryService } from 'src/app/module/agenda/data/reposito
|
|||||||
import { RoleIdService } from 'src/app/services/role-id.service'
|
import { RoleIdService } from 'src/app/services/role-id.service'
|
||||||
import { TableSharedCalendar } from 'src/app/module/agenda/data/data-source/agenda-local-data-source.service';
|
import { TableSharedCalendar } from 'src/app/module/agenda/data/data-source/agenda-local-data-source.service';
|
||||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||||
import { ContactRepositoryService } from 'src/app/services/Repositorys/contacts/repository/contacts-repository.service';
|
|
||||||
import { UserList } from 'src/app/models/entiry/agenda/contact';
|
import { UserList } from 'src/app/models/entiry/agenda/contact';
|
||||||
import { AgendaService } from 'src/app/module/agenda/domain/agenda.service'
|
import { AgendaService } from 'src/app/module/agenda/domain/agenda.service'
|
||||||
import { RoleId } from 'src/app/core/agenda/use-case/event-set-default-participants.service';
|
import { RoleId } from 'src/app/core/agenda/use-case/event-set-default-participants.service';
|
||||||
@@ -58,9 +53,6 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
|||||||
|
|
||||||
export class NewEventPage implements OnInit {
|
export class NewEventPage implements OnInit {
|
||||||
|
|
||||||
eventBody: EventBody;
|
|
||||||
segment: string = "true";
|
|
||||||
|
|
||||||
public date: any;
|
public date: any;
|
||||||
public disabled = false;
|
public disabled = false;
|
||||||
public showSpinners = true;
|
public showSpinners = true;
|
||||||
@@ -70,13 +62,10 @@ export class NewEventPage implements OnInit {
|
|||||||
public stepHour = 1;
|
public stepHour = 1;
|
||||||
public stepMinute = 15;
|
public stepMinute = 15;
|
||||||
public stepSecond = 15;
|
public stepSecond = 15;
|
||||||
currentDate = this.roundTimeQuarterHour();
|
|
||||||
public color: ThemePalette = 'primary';
|
public color: ThemePalette = 'primary';
|
||||||
recurringTypes = []
|
|
||||||
selectedRecurringType: any;
|
selectedRecurringType: any;
|
||||||
loggedAttendDad: boolean = true;
|
loggedAttendDad: boolean = true;
|
||||||
mostrarModal = false;
|
mostrarModal = false;
|
||||||
eventRecurence = 'never'
|
|
||||||
|
|
||||||
@Input() attendees: []
|
@Input() attendees: []
|
||||||
@Input() profile: string;
|
@Input() profile: string;
|
||||||
@@ -91,7 +80,6 @@ export class NewEventPage implements OnInit {
|
|||||||
@Output() setIntervenientCC = new EventEmitter<any>();
|
@Output() setIntervenientCC = new EventEmitter<any>();
|
||||||
|
|
||||||
postEvent: Event;
|
postEvent: Event;
|
||||||
postEventToAprove: EventToAprove;
|
|
||||||
@Output() onAddEvent = new EventEmitter<any>();
|
@Output() onAddEvent = new EventEmitter<any>();
|
||||||
@Output() openAttendeesComponent = new EventEmitter<any>();
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
@Output() clearContact = new EventEmitter<any>();
|
@Output() clearContact = new EventEmitter<any>();
|
||||||
@@ -102,11 +90,7 @@ export class NewEventPage implements OnInit {
|
|||||||
documents: SearchList_v2[] = [];
|
documents: SearchList_v2[] = [];
|
||||||
|
|
||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
@ViewChild('picker') picker: any;
|
|
||||||
@ViewChild('fim') fim: any;
|
|
||||||
@ViewChild('inicio') inicio: any;
|
|
||||||
@ViewChild('occurrence') occurrence: any;
|
|
||||||
@ViewChild('picker1') picker1: any;
|
|
||||||
|
|
||||||
Form: FormGroup;
|
Form: FormGroup;
|
||||||
validateFrom = false;
|
validateFrom = false;
|
||||||
@@ -139,6 +123,19 @@ export class NewEventPage implements OnInit {
|
|||||||
selectedUserCalendar:any;
|
selectedUserCalendar:any;
|
||||||
SessionStore = SessionStore
|
SessionStore = SessionStore
|
||||||
hasChangeCalendar = false
|
hasChangeCalendar = false
|
||||||
|
|
||||||
|
daysOfWeek = {
|
||||||
|
sun: false,
|
||||||
|
mon: false,
|
||||||
|
tues: false,
|
||||||
|
wed: false,
|
||||||
|
thurs: false,
|
||||||
|
fri: false,
|
||||||
|
sat: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
@@ -149,7 +146,6 @@ export class NewEventPage implements OnInit {
|
|||||||
private changeProfileService: ChangeProfileService,
|
private changeProfileService: ChangeProfileService,
|
||||||
private agendaDataRepository: AgendaDataRepositoryService,
|
private agendaDataRepository: AgendaDataRepositoryService,
|
||||||
public RoleIdService: RoleIdService,
|
public RoleIdService: RoleIdService,
|
||||||
private ContactRepositoryService: ContactRepositoryService,
|
|
||||||
private AgendaService: AgendaService
|
private AgendaService: AgendaService
|
||||||
) {
|
) {
|
||||||
this.dateAdapter.setLocale('pt');
|
this.dateAdapter.setLocale('pt');
|
||||||
@@ -198,8 +194,7 @@ export class NewEventPage implements OnInit {
|
|||||||
if (!this.restoreTemporaryData()) {
|
if (!this.restoreTemporaryData()) {
|
||||||
// clear
|
// clear
|
||||||
this.setCalendarByDefault(true)
|
this.setCalendarByDefault(true)
|
||||||
this.eventBody = { BodyType: "1", Text: "" };
|
this.postEvent.Body = { BodyType: "1", Text: "" };
|
||||||
this.postEvent.Body = this.eventBody;
|
|
||||||
|
|
||||||
this.initializeData()
|
this.initializeData()
|
||||||
|
|
||||||
@@ -233,7 +228,7 @@ export class NewEventPage implements OnInit {
|
|||||||
this.postEvent = {
|
this.postEvent = {
|
||||||
EventId: '',
|
EventId: '',
|
||||||
Subject: '',
|
Subject: '',
|
||||||
Body: this.eventBody,
|
Body: { BodyType: "1", Text: "" },
|
||||||
Location: '',
|
Location: '',
|
||||||
CalendarId: '',
|
CalendarId: '',
|
||||||
CalendarName: 'Oficial',
|
CalendarName: 'Oficial',
|
||||||
@@ -249,8 +244,10 @@ export class NewEventPage implements OnInit {
|
|||||||
Category: 'Meeting',
|
Category: 'Meeting',
|
||||||
HasAttachments: false,
|
HasAttachments: false,
|
||||||
EventRecurrence: {
|
EventRecurrence: {
|
||||||
frequency: this.eventRecurence, until: "",
|
frequency: "never",
|
||||||
Type: ''
|
until: "",
|
||||||
|
Type: '',
|
||||||
|
daysOfWeek: []
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -307,13 +304,7 @@ export class NewEventPage implements OnInit {
|
|||||||
return date
|
return date
|
||||||
}
|
}
|
||||||
|
|
||||||
setStartDate() {
|
|
||||||
// this.postEvent.StartDate = this.roundTimeQuarterHour();
|
|
||||||
}
|
|
||||||
|
|
||||||
setEndDate() {
|
|
||||||
// this.postEvent.EndDate = this.postEvent.StartDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
runValidation() {
|
runValidation() {
|
||||||
this.validateFrom = true;
|
this.validateFrom = true;
|
||||||
@@ -324,11 +315,6 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
injectValidation() {
|
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({
|
this.Form = new FormGroup({
|
||||||
Subject: new FormControl(this.postEvent.Subject, [
|
Subject: new FormControl(this.postEvent.Subject, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
@@ -393,12 +379,6 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// openLastOccurrence() {
|
|
||||||
// let input: any = document.querySelector('#last-occurrence')
|
|
||||||
// if (input) {
|
|
||||||
// input.click()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
async getDoc() {
|
async getDoc() {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
@@ -442,13 +422,6 @@ export class NewEventPage implements OnInit {
|
|||||||
this.cloneAllmobileComponent.emit({})
|
this.cloneAllmobileComponent.emit({})
|
||||||
}
|
}
|
||||||
|
|
||||||
// getRecurrenceTypes() {
|
|
||||||
// this.eventService.getRecurrenceTypes().subscribe(res => {
|
|
||||||
|
|
||||||
// this.recurringTypes = res;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
calculetedLastOccurrence(type: number) {
|
calculetedLastOccurrence(type: number) {
|
||||||
|
|
||||||
@@ -503,6 +476,18 @@ export class NewEventPage implements OnInit {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let i =0;
|
||||||
|
this.postEvent.EventRecurrence.daysOfWeek = []
|
||||||
|
for(const [key, value] of Object.entries(this.daysOfWeek)) {
|
||||||
|
if(value) {
|
||||||
|
if(!this.postEvent.EventRecurrence.daysOfWeek.includes(i)) {
|
||||||
|
this.postEvent.EventRecurrence.daysOfWeek.push(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let loader = this.toastService.loading();
|
let loader = this.toastService.loading();
|
||||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc) as any
|
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc) as any
|
||||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||||
@@ -578,13 +563,12 @@ export class NewEventPage implements OnInit {
|
|||||||
saveTemporaryData() {
|
saveTemporaryData() {
|
||||||
window['temp.path:/home/agenda/new-event.component.ts'] = {
|
window['temp.path:/home/agenda/new-event.component.ts'] = {
|
||||||
postEvent: this.postEvent,
|
postEvent: this.postEvent,
|
||||||
eventBody: this.eventBody,
|
|
||||||
allDayCheck: this.allDayCheck,
|
allDayCheck: this.allDayCheck,
|
||||||
segment: this.segment,
|
|
||||||
CalendarName: this.CalendarName,
|
CalendarName: this.CalendarName,
|
||||||
documents: this.documents,
|
documents: this.documents,
|
||||||
selectedUserCalendar: this.selectedUserCalendar,
|
selectedUserCalendar: this.selectedUserCalendar,
|
||||||
hasChangeCalendar: this.hasChangeCalendar
|
hasChangeCalendar: this.hasChangeCalendar,
|
||||||
|
daysOfWeek: this.daysOfWeek
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,12 +584,11 @@ export class NewEventPage implements OnInit {
|
|||||||
if (JSON.stringify(restoredData) != "{}" && undefined != restoredData) {
|
if (JSON.stringify(restoredData) != "{}" && undefined != restoredData) {
|
||||||
this.postEvent = restoredData.postEvent
|
this.postEvent = restoredData.postEvent
|
||||||
this.allDayCheck = restoredData.allDayCheck
|
this.allDayCheck = restoredData.allDayCheck
|
||||||
this.eventBody = restoredData.eventBody
|
|
||||||
this.segment = restoredData.segment
|
|
||||||
this.CalendarName = restoredData.CalendarName
|
this.CalendarName = restoredData.CalendarName
|
||||||
this.documents = restoredData.documents
|
this.documents = restoredData.documents
|
||||||
this.selectedUserCalendar = restoredData.selectedUserCalendar
|
this.selectedUserCalendar = restoredData.selectedUserCalendar
|
||||||
this.hasChangeCalendar = restoredData.hasChangeCalendar
|
this.hasChangeCalendar = restoredData.hasChangeCalendar
|
||||||
|
this.daysOfWeek = restoredData.daysOfWeek
|
||||||
|
|
||||||
// restore dater for date and hours picker
|
// restore dater for date and hours picker
|
||||||
|
|
||||||
|
|||||||
@@ -168,12 +168,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div" *ngIf="postEvent?.EventRecurrence?.frequency">
|
<div class="container-div width-100" *ngIf="postEvent?.EventRecurrence?.frequency">
|
||||||
<div class="ion-item-class-2 d-flex">
|
<div class="ion-item-class-2 d-flex width-100">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-reapet.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-reapet.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs">
|
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs">
|
||||||
|
|
||||||
<mat-form-field appearance="none" class="width-100" placeholder="Sample Type" required>
|
<mat-form-field appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||||
<!-- <input matInput type="text" > -->
|
<!-- <input matInput type="text" > -->
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
Diário
|
Diário
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="weekly">
|
<mat-option value="weekly">
|
||||||
Semanalmente
|
Semanal
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="monthly">
|
<mat-option value="monthly">
|
||||||
Mensal
|
Mensal
|
||||||
@@ -200,8 +200,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="postEvent?.EventRecurrence?.frequency != 'never'" class="container-div">
|
<div class="container-div width-100" *ngIf="postEvent.EventRecurrence.frequency == 'weekly' || postEvent.EventRecurrence.frequency == 'monthly'">
|
||||||
<div class="ion-item-class-2 d-flex" >
|
<div class="ion-item-class-2 d-flex justify-content-around font-13-em">
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.mon" (click)="daysOfWeek.mon=!daysOfWeek.mon">Seg</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.tues" (click)="daysOfWeek.tues=!daysOfWeek.tues">Terça</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.wed" (click)="daysOfWeek.wed=!daysOfWeek.wed">quarta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.thurs" (click)="daysOfWeek.thurs=!daysOfWeek.thurs">quinta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.fri" (click)="daysOfWeek.fri=!daysOfWeek.fri">Sexta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sat" (click)="daysOfWeek.sat=!daysOfWeek.sat">Sabado</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sun" (click)="daysOfWeek.sun=!daysOfWeek.sun">Domingo</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="postEvent?.EventRecurrence?.frequency != 'never'" class="container-div width-100">
|
||||||
|
<div class="ion-item-class-2 d-flex width-100" >
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-reapet.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-reapet.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -204,3 +204,15 @@
|
|||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.segment{
|
||||||
|
box-shadow: 0px 0px 10px #b3b3b3;
|
||||||
|
padding: 3px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.segment-active {
|
||||||
|
background-color: rgb(212, 212, 212);
|
||||||
|
}
|
||||||
|
|||||||
@@ -112,6 +112,16 @@ export class EditEventPage implements OnInit {
|
|||||||
editAllEvent = false
|
editAllEvent = false
|
||||||
closeModal = false
|
closeModal = false
|
||||||
|
|
||||||
|
daysOfWeek = {
|
||||||
|
sun: false,
|
||||||
|
mon: false,
|
||||||
|
tues: false,
|
||||||
|
wed: false,
|
||||||
|
thurs: false,
|
||||||
|
fri: false,
|
||||||
|
sat: false,
|
||||||
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
@@ -173,8 +183,41 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
this.changeAgenda()
|
this.changeAgenda()
|
||||||
this.sharedCalendar = this.agendaDataRepository.getShareCalendarItemsLiveWithOrder()
|
this.sharedCalendar = this.agendaDataRepository.getShareCalendarItemsLiveWithOrder()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
checkForWeekDaysSelect() {
|
||||||
|
|
||||||
|
if(!this.postEvent.EventRecurrence?.daysOfWeek) {
|
||||||
|
this.postEvent.EventRecurrence.daysOfWeek = []
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.postEvent.EventRecurrence?.daysOfWeek.includes(0)) {
|
||||||
|
this.daysOfWeek.sun = true
|
||||||
|
}
|
||||||
|
if (this.postEvent.EventRecurrence?.daysOfWeek.includes(1)) {
|
||||||
|
this.daysOfWeek.mon = true
|
||||||
|
}
|
||||||
|
if (this.postEvent.EventRecurrence?.daysOfWeek.includes(2)) {
|
||||||
|
this.daysOfWeek.tues = true
|
||||||
|
}
|
||||||
|
if (this.postEvent.EventRecurrence?.daysOfWeek.includes(3)) {
|
||||||
|
this.daysOfWeek.wed = true
|
||||||
|
}
|
||||||
|
if (this.postEvent.EventRecurrence?.daysOfWeek.includes(4)) {
|
||||||
|
this.daysOfWeek.thurs = true
|
||||||
|
}
|
||||||
|
if (this.postEvent.EventRecurrence?.daysOfWeek.includes(5)) {
|
||||||
|
this.daysOfWeek.fri = true
|
||||||
|
}
|
||||||
|
if (this.postEvent.EventRecurrence?.daysOfWeek.includes(6)) {
|
||||||
|
this.daysOfWeek.sat = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
hasPrCalendar(data: TableSharedCalendar[]) {
|
hasPrCalendar(data: TableSharedCalendar[]) {
|
||||||
for(const e of data) {
|
for(const e of data) {
|
||||||
if(e.roleId == this.RoleIdService.PRES) {
|
if(e.roleId == this.RoleIdService.PRES) {
|
||||||
@@ -212,6 +255,8 @@ export class EditEventPage implements OnInit {
|
|||||||
this.selectedRecurringType = this.postEvent.EventRecurrence.Type.toString();
|
this.selectedRecurringType = this.postEvent.EventRecurrence.Type.toString();
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
this.checkForWeekDaysSelect()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
@@ -414,6 +459,18 @@ export class EditEventPage implements OnInit {
|
|||||||
this.runValidation()
|
this.runValidation()
|
||||||
|
|
||||||
|
|
||||||
|
let i =0;
|
||||||
|
this.postEvent.EventRecurrence.daysOfWeek = []
|
||||||
|
for(const [key, value] of Object.entries(this.daysOfWeek)) {
|
||||||
|
if(value) {
|
||||||
|
if(!this.postEvent.EventRecurrence.daysOfWeek.includes(i)) {
|
||||||
|
this.postEvent.EventRecurrence.daysOfWeek.push(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (this.Form.invalid) {
|
if (this.Form.invalid) {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
Diário
|
Diário
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="weekly">
|
<mat-option value="weekly">
|
||||||
Semanalmente
|
Semanal
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option value="monthly">
|
<mat-option value="monthly">
|
||||||
Mensal
|
Mensal
|
||||||
@@ -150,6 +150,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-div" *ngIf="postEvent.EventRecurrence.frequency == 'weekly' || postEvent.EventRecurrence.frequency == 'monthly'">
|
||||||
|
<div class="ion-item-class-2 d-flex justify-content-around font-13-em">
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.mon" (click)="daysOfWeek.mon=!daysOfWeek.mon">Seg</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.tues" (click)="daysOfWeek.tues=!daysOfWeek.tues">Terça</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.wed" (click)="daysOfWeek.wed=!daysOfWeek.wed">quarta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.thurs" (click)="daysOfWeek.thurs=!daysOfWeek.thurs">quinta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.fri" (click)="daysOfWeek.fri=!daysOfWeek.fri">Sexta</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sat" (click)="daysOfWeek.sat=!daysOfWeek.sat">Sabado</div>
|
||||||
|
<div class="segment cursor-pointer" [class.segment-active]="daysOfWeek.sun" (click)="daysOfWeek.sun=!daysOfWeek.sun">Domingo</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="postEvent.EventRecurrence.frequency != 'never'" class="container-div">
|
<div *ngIf="postEvent.EventRecurrence.frequency != 'never'" class="container-div">
|
||||||
<div class="ion-item-class-2 d-flex" >
|
<div class="ion-item-class-2 d-flex" >
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
|
|||||||
@@ -227,3 +227,15 @@ ion-content{
|
|||||||
width: auto;
|
width: auto;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.segment{
|
||||||
|
box-shadow: 0px 0px 10px #b3b3b3;
|
||||||
|
padding: 3px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.segment-active {
|
||||||
|
background-color: rgb(212, 212, 212);
|
||||||
|
}
|
||||||
|
|||||||
@@ -119,6 +119,16 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
hasChangeCalendar = false
|
hasChangeCalendar = false
|
||||||
|
|
||||||
|
daysOfWeek = {
|
||||||
|
sun: false,
|
||||||
|
mon: false,
|
||||||
|
tues: false,
|
||||||
|
wed: false,
|
||||||
|
thurs: false,
|
||||||
|
fri: false,
|
||||||
|
sat: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -219,8 +229,12 @@ export class NewEventPage implements OnInit {
|
|||||||
Organizer: '',
|
Organizer: '',
|
||||||
Category: 'Meeting',
|
Category: 'Meeting',
|
||||||
HasAttachments: false,
|
HasAttachments: false,
|
||||||
EventRecurrence: { frequency: this.eventRecurence, until: "",
|
EventRecurrence: {
|
||||||
Type: '' },
|
frequency: this.eventRecurence,
|
||||||
|
until: "",
|
||||||
|
Type: '',
|
||||||
|
daysOfWeek: []
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
@@ -404,34 +418,24 @@ export class NewEventPage implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
openInicio() {
|
|
||||||
let input: any = document.querySelector('#new-inicio')
|
|
||||||
if (input) {
|
|
||||||
|
|
||||||
input.click()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
openFim() {
|
|
||||||
let input: any = document.querySelector('#new-fim')
|
|
||||||
if (input) {
|
|
||||||
input.click()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
openLastOccurrence() {
|
|
||||||
let input: any = document.querySelector('#last-occurrence')
|
|
||||||
if (input) {
|
|
||||||
input.click()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@XTracerAsync({name:'Mobile/create-event', bugPrint: true})
|
@XTracerAsync({name:'Mobile/create-event', bugPrint: true})
|
||||||
async save_v2(tracing?: TracingType) {
|
async save_v2(tracing?: TracingType) {
|
||||||
this.injectValidation()
|
this.injectValidation()
|
||||||
this.runValidation()
|
this.runValidation()
|
||||||
|
|
||||||
|
let i =0;
|
||||||
|
this.postEvent.EventRecurrence.daysOfWeek = []
|
||||||
|
for(const [key, value] of Object.entries(this.daysOfWeek)) {
|
||||||
|
if(value) {
|
||||||
|
if(!this.postEvent.EventRecurrence.daysOfWeek.includes(i)) {
|
||||||
|
this.postEvent.EventRecurrence.daysOfWeek.push(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(new Date(this.postEvent.StartDate).getTime())
|
console.log(new Date(this.postEvent.StartDate).getTime())
|
||||||
console.log(new Date(this.postEvent.EndDate).getTime())
|
console.log(new Date(this.postEvent.EndDate).getTime())
|
||||||
console.log(new Date(this.postEvent.StartDate).getTime() < new Date(this.postEvent.EndDate).getTime() ? 'ok' : null)
|
console.log(new Date(this.postEvent.StartDate).getTime() < new Date(this.postEvent.EndDate).getTime() ? 'ok' : null)
|
||||||
@@ -472,21 +476,6 @@ export class NewEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// //This method return calendar onwner user id
|
|
||||||
// selectedCalendarUserId() {
|
|
||||||
|
|
||||||
// if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.postEvent.CalendarName == 'Oficial') {
|
|
||||||
// return this.eventService.calendarNamesType[this.CalendarName]['OwnerId']
|
|
||||||
|
|
||||||
// } else if (this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal'] && this.postEvent.CalendarName == 'Pessoal') {
|
|
||||||
|
|
||||||
// return this.eventService.calendarNamesType[this.CalendarName]['OwnerId']
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// return '11:11'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
async changeAgenda() {
|
async changeAgenda() {
|
||||||
|
|
||||||
const result = await this.agendaDataRepository.geCalendars()
|
const result = await this.agendaDataRepository.geCalendars()
|
||||||
@@ -591,34 +580,6 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Deve ser removido posteriormente
|
|
||||||
eventToaproveBody(event, calendarId, role, userId, attachments) {
|
|
||||||
let toAproveObject = {
|
|
||||||
"EventProcess": {
|
|
||||||
"Body": event.Body,
|
|
||||||
"Location": event.Location,
|
|
||||||
"Subject": event.Subject,
|
|
||||||
"StartDate": event.StartDate,
|
|
||||||
"EndDate": event.EndDate,
|
|
||||||
"Status": "Active",
|
|
||||||
"IsAllDayEvent": event.IsRecurring,
|
|
||||||
"EventType": event.EventType,
|
|
||||||
"ParticipantsList": event.Attendees,
|
|
||||||
"EventRecurrence": event.EventRecurrence,
|
|
||||||
"HasAttachments": event.HasAttachments,
|
|
||||||
"CalendarId": calendarId,
|
|
||||||
"Role": role,
|
|
||||||
"wxUserID": userId,
|
|
||||||
"TimeZone": "W. Central Africa Standard Time"
|
|
||||||
},
|
|
||||||
"Attachments": attachments,
|
|
||||||
"InstanceID": "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate()
|
|
||||||
}
|
|
||||||
|
|
||||||
return toAproveObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
async fetchContacts(filter: string) {
|
async fetchContacts(filter: string) {
|
||||||
|
|
||||||
const result = await this.AgendaService.setDefaultParticipants()
|
const result = await this.AgendaService.setDefaultParticipants()
|
||||||
|
|||||||
@@ -185,3 +185,4 @@ defineCustomElements(window);
|
|||||||
// console.log('Column:', parsedError.columnNumber);
|
// console.log('Column:', parsedError.columnNumber);
|
||||||
|
|
||||||
// fetchAndHandleSourceMap(matches);
|
// fetchAndHandleSourceMap(matches);
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "661b449fb",
|
"shortSHA": "ac1f01b15",
|
||||||
"SHA": "661b449fb4818c27a829f1ba91b0d73b2eb1e3b5",
|
"SHA": "ac1f01b15b042162bee58c4d23ee56c1070553b6",
|
||||||
"branch": "feature/chat-new-api-peter",
|
"branch": "feature/chat-new-api-peter",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Fri Oct 18 16:22:45 2024 +0100'",
|
"lastCommitTime": "'Mon Oct 21 10:15:48 2024 +0100'",
|
||||||
"lastCommitMessage": "improve setup meeting from task",
|
"lastCommitMessage": "remove uunsed",
|
||||||
"lastCommitNumber": "6103",
|
"lastCommitNumber": "6104",
|
||||||
"changeStatus": "On branch feature/chat-new-api-peter\nYour branch is ahead of 'origin/feature/chat-new-api-peter' by 3 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tdeleted: src/app/Rules/aprove-event.service.spec.ts\n\tdeleted: src/app/Rules/aprove-event.service.ts\n\tmodified: src/app/app-routing.module.ts\n\tmodified: src/app/home/home.page.ts\n\tdeleted: src/app/modals/chat-options-features/chat-options-features-routing.module.ts\n\tdeleted: src/app/modals/chat-options-features/chat-options-features.module.ts\n\tdeleted: src/app/modals/chat-options-features/chat-options-features.page.html\n\tdeleted: src/app/modals/chat-options-features/chat-options-features.page.scss\n\tdeleted: src/app/modals/chat-options-features/chat-options-features.page.spec.ts\n\tdeleted: src/app/modals/chat-options-features/chat-options-features.page.ts\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n\tmodified: src/app/modals/forward/forward.page.ts\n\tmodified: src/app/module/agenda/utils.ts\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/services/auth.service.ts\n\tmodified: src/app/services/events.service.ts\n\tdeleted: src/app/services/hardware-go-back.service.spec.ts\n\tdeleted: src/app/services/hardware-go-back.service.ts\n\tmodified: src/app/services/notifications.service.ts\n\tdeleted: src/app/services/offline-manager.service.spec.ts\n\tdeleted: src/app/services/offline-manager.service.ts\n\tmodified: src/app/services/rules/event.service.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedients/expedients.page.ts\n\tmodified: src/app/ui/agenda/agenda.page.ts\n\tmodified: src/app/ui/agenda/component/approve-event/approve-event.page.ts\n\tmodified: src/app/ui/agenda/component/edit-event-to-approve/edit-event-to-approve.page.ts\n\tmodified: src/app/ui/agenda/component/event-list/event-list.page.ts\n\tmodified: src/app/ui/agenda/component/new-event/new-event.page.ts\n\tmodified: src/app/ui/agenda/component/view-event/view-event.page.ts\n\tmodified: src/app/ui/agenda/modal/edit-event/edit-event.page.ts\n\tmodified: src/app/ui/agenda/modal/new-event/new-event.page.ts\n\tmodified: src/app/ui/agenda/modal/view-event/view-event.page.ts\n\tmodified: src/app/ui/chat/component/messages/messages.page.ts\n\tmodified: version/git-version.ts",
|
"changeStatus": "On branch feature/chat-new-api-peter\nYour branch is up to date with 'origin/feature/chat-new-api-peter'.\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/app.module.ts\n\tmodified: src/app/core/agenda/use-case/event-set-default-participants.service.ts\n\tmodified: src/app/core/chat/usecase/room/room-set-last-message.service.ts\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.scss\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n\tmodified: src/app/models/event.model.ts\n\tmodified: src/app/module/agenda/data/dto/eventDTOOutput.ts\n\tmodified: src/app/module/agenda/data/repository/agenda-data-repository.service.ts\n\tmodified: src/app/module/agenda/domain/mapper/EventDetailsMapper.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.scss\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/ui/agenda/component/edit-event/edit-event.page.html\n\tmodified: src/app/ui/agenda/component/edit-event/edit-event.page.scss\n\tmodified: src/app/ui/agenda/component/edit-event/edit-event.page.ts\n\tmodified: src/app/ui/agenda/component/event-list/event-list.page.ts\n\tmodified: src/app/ui/agenda/component/new-event/new-event.page.html\n\tmodified: src/app/ui/agenda/component/new-event/new-event.page.scss\n\tmodified: src/app/ui/agenda/component/new-event/new-event.page.ts\n\tmodified: src/app/ui/agenda/modal/edit-event/edit-event.page.html\n\tmodified: src/app/ui/agenda/modal/edit-event/edit-event.page.scss\n\tmodified: src/app/ui/agenda/modal/edit-event/edit-event.page.ts\n\tmodified: src/app/ui/agenda/modal/new-event/new-event.page.html\n\tmodified: src/app/ui/agenda/modal/new-event/new-event.page.scss\n\tmodified: src/app/ui/agenda/modal/new-event/new-event.page.ts\n\tmodified: src/main.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user