mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -87,6 +87,48 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.Category"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
|
||||
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select [(ngModel)]="eventProcess.workflowInstanceDataFields.Category" >
|
||||
<mat-option value="Reunião">
|
||||
Reunião
|
||||
</mat-option>
|
||||
<mat-option value="Viagem">
|
||||
Viagem
|
||||
</mat-option>
|
||||
<mat-option value="Conferência">
|
||||
Conferência
|
||||
</mat-option>
|
||||
<mat-option value="Encontro">
|
||||
Encontro
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('participantes').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('participantes').errors?.required">
|
||||
|
||||
@@ -72,6 +72,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
workflowInstanceDataFields:{
|
||||
Body: "",
|
||||
OccurrenceType: '',
|
||||
Category: '',
|
||||
LastOccurrence: '',
|
||||
IsRecurring: false,
|
||||
ParticipantsList: [],
|
||||
@@ -146,7 +147,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
|
||||
async getTask() {
|
||||
|
||||
this.processes.GetTask(this.serialNumber).subscribe( result =>{
|
||||
this.processes.GetTask(this.serialNumber).subscribe( (result) =>{
|
||||
this.eventProcess = result
|
||||
|
||||
this.restoreDatepickerData()
|
||||
@@ -302,6 +303,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
LastOccurrence: this.eventProcess.workflowInstanceDataFields.LastOccurrence,
|
||||
},
|
||||
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
|
||||
Category: this.eventProcess.workflowInstanceDataFields.Category
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
123123
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 width-100 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
|
||||
@@ -68,6 +68,49 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.Category"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
|
||||
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select [(ngModel)]="eventProcess.workflowInstanceDataFields.Category" >
|
||||
<mat-option value="Reunião">
|
||||
Reunião
|
||||
</mat-option>
|
||||
<mat-option value="Viagem">
|
||||
Viagem
|
||||
</mat-option>
|
||||
<mat-option value="Conferência">
|
||||
Conferência
|
||||
</mat-option>
|
||||
<mat-option value="Encontro">
|
||||
Encontro
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
|
||||
@@ -68,6 +68,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
workflowInstanceDataFields:{
|
||||
Body: "",
|
||||
OccurrenceType: '',
|
||||
Category: '',
|
||||
LastOccurrence: '',
|
||||
ParticipantsList: [],
|
||||
Agenda: '',
|
||||
@@ -132,41 +133,42 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
async getTask() {
|
||||
|
||||
const result = await this.processes.GetTask(this.serialNumber).toPromise();
|
||||
console.log(result);
|
||||
console.log(result);
|
||||
|
||||
this.eventProcess = result
|
||||
this.eventProcess.workflowInstanceDataFields.Category = result.workflowInstanceDataFields.EventType
|
||||
|
||||
this.startDate = new Date(this.eventProcess.workflowInstanceDataFields.StartDate);
|
||||
this.endDate = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
|
||||
this.startDate = new Date(this.eventProcess.workflowInstanceDataFields.StartDate);
|
||||
this.endDate = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
|
||||
|
||||
// description
|
||||
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
this.Location = this.eventProcess.workflowInstanceDataFields.Location
|
||||
// description
|
||||
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
this.Location = this.eventProcess.workflowInstanceDataFields.Location
|
||||
|
||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||
try {
|
||||
this.getAttachments()
|
||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||
try {
|
||||
this.getAttachments()
|
||||
|
||||
} catch (error) {
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
|
||||
this.isRecurring = "Não se repete";
|
||||
}
|
||||
else {
|
||||
this.isRecurring = "Repete";
|
||||
}
|
||||
|
||||
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
|
||||
if(e.IsRequired) {
|
||||
this.taskParticipants.push(e);
|
||||
} else {
|
||||
this.taskParticipantsCc.push(e);
|
||||
}
|
||||
|
||||
|
||||
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
|
||||
this.isRecurring = "Não se repete";
|
||||
}
|
||||
else {
|
||||
this.isRecurring = "Repete";
|
||||
}
|
||||
|
||||
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
|
||||
if(e.IsRequired) {
|
||||
this.taskParticipants.push(e);
|
||||
} else {
|
||||
this.taskParticipantsCc.push(e);
|
||||
}
|
||||
})
|
||||
})
|
||||
/* }) */
|
||||
}
|
||||
|
||||
@@ -254,6 +256,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
LastOccurrence: this.eventProcess.workflowInstanceDataFields.LastOccurrence,
|
||||
},
|
||||
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
|
||||
Category: this.eventProcess.workflowInstanceDataFields.Category
|
||||
}
|
||||
|
||||
console.log(event);
|
||||
@@ -307,14 +310,19 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
|
||||
if(data){
|
||||
if(data) {
|
||||
data = data['data'];
|
||||
|
||||
const newAttendees: EventPerson[] = data['taskParticipants'];
|
||||
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
|
||||
|
||||
this.setIntervenient(newAttendees);
|
||||
this.setIntervenientCC(newAttendeesCC);
|
||||
if(newAttendees.length) {
|
||||
this.setIntervenient(newAttendees);
|
||||
}
|
||||
if(newAttendeesCC) {
|
||||
this.setIntervenientCC(newAttendeesCC);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -6,6 +6,7 @@ import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { ProfilePage } from 'src/app/modals/profile/profile.page';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { NotificationsService } from '../../services/notifications.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
@@ -32,6 +33,7 @@ export class HeaderPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private storageservice: StorageService,
|
||||
private platform: Platform,
|
||||
private notificationsService: NotificationsService,
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
router.events.subscribe((val) => {
|
||||
@@ -45,21 +47,28 @@ export class HeaderPage implements OnInit {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
console.log('Notifications not supported')
|
||||
} else {
|
||||
this.notificationLengthData();
|
||||
this.UpdateNotificationCount();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async notificationLengthData() {
|
||||
UpdateNotificationCount() {
|
||||
this.notificationsService.registerCallback(
|
||||
'any',
|
||||
() => {
|
||||
this.notificationLengthData();
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
notificationLengthData() {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
console.log("Init get store", value)
|
||||
|
||||
var data = JSON.parse(value);
|
||||
this.notificationLength = data.length;
|
||||
/* var data = JSON.parse(value); */
|
||||
this.notificationLength = value.length;
|
||||
})
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 10000))
|
||||
await this.notificationLengthData()
|
||||
console.log('Timer badge count')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user