mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
save
This commit is contained in:
@@ -261,9 +261,6 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
this.processesbackend.GetToApprovedEvents('Agenda','true').subscribe(res=>{
|
this.processesbackend.GetToApprovedEvents('Agenda','true').subscribe(res=>{
|
||||||
this.count_ev_apr = res;
|
this.count_ev_apr = res;
|
||||||
});
|
});
|
||||||
/* this.processesbackend.GetToApprovedEvents('MDGPR','true').subscribe(res=>{
|
|
||||||
this.count_ev_md = res;
|
|
||||||
}); */
|
|
||||||
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'
|
|||||||
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
||||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -28,6 +29,7 @@ import { MatInputModule } from '@angular/material/input';
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
EditEventToApprovePageRoutingModule,
|
EditEventToApprovePageRoutingModule,
|
||||||
|
// Angular material
|
||||||
MatDatepickerModule,
|
MatDatepickerModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
MatNativeDateModule,
|
MatNativeDateModule,
|
||||||
@@ -37,7 +39,8 @@ import { MatInputModule } from '@angular/material/input';
|
|||||||
NgxMatMomentModule,
|
NgxMatMomentModule,
|
||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
ReactiveFormsModule
|
ReactiveFormsModule,
|
||||||
|
MatDialogModule,
|
||||||
],
|
],
|
||||||
declarations: [EditEventToApprovePage],
|
declarations: [EditEventToApprovePage],
|
||||||
exports: [EditEventToApprovePage]
|
exports: [EditEventToApprovePage]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<ion-label class="title">Editar evento por aprovar</ion-label>
|
<ion-label class="title">Editar evento por aprovar TK</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
@@ -70,8 +70,10 @@
|
|||||||
</ion-select>
|
</ion-select>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field appearance="none" class="d-none d-md-block width-100" >
|
<mat-form-field appearance="none"
|
||||||
<mat-select placeholder="Selecione agenda" [(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda" >
|
class="d-none d-md-block width-100" >
|
||||||
|
<mat-select placeholder="Selecione agenda"
|
||||||
|
[(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda" >
|
||||||
<mat-option value="Oficial">
|
<mat-option value="Oficial">
|
||||||
Oficial
|
Oficial
|
||||||
</mat-option>
|
</mat-option>
|
||||||
@@ -176,31 +178,23 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class">
|
||||||
<ion-select
|
|
||||||
placeholder="Selecione repetição"
|
|
||||||
class="d-block d-md-none"
|
|
||||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.IsRecurring"
|
|
||||||
selectedText="{{isRecurring}}"
|
|
||||||
interface="action-sheet"
|
|
||||||
Cancel-text="Cancelar" required>
|
|
||||||
<ion-select-option value="false">Não se repete</ion-select-option>
|
|
||||||
<ion-select-option value="true">Repete</ion-select-option>
|
|
||||||
</ion-select>
|
|
||||||
|
|
||||||
<mat-form-field
|
<mat-form-field
|
||||||
class="width-100 d-none d-md-block"
|
class="width-100 d-block "
|
||||||
placeholder="Selecione repetição"
|
placeholder="Selecione repetição"
|
||||||
value="false"
|
value="false"
|
||||||
interface="action-sheet"
|
interface="action-sheet"
|
||||||
required
|
required
|
||||||
appearance="none"
|
appearance="none"
|
||||||
>
|
>
|
||||||
<mat-select [(value)]="eventProcess.workflowInstanceDataFields.IsRecurring">
|
<mat-select
|
||||||
<mat-option value="false">
|
[(ngModel)]="eventProcess.workflowInstanceDataFields.OccurrenceType"
|
||||||
Não se repete
|
(ngModelChange)="onSelectedRecurringChanged($event)"
|
||||||
</mat-option>
|
>
|
||||||
<mat-option value="true">
|
<mat-option
|
||||||
Repete
|
*ngFor="let recurring of recurringTypes" value="{{recurring.Code}}"
|
||||||
|
>
|
||||||
|
{{recurring.Description}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@@ -209,6 +203,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="eventProcess.workflowInstanceDataFields.OccurrenceType != '-1'"
|
||||||
|
class="container-div width-100">
|
||||||
|
<div class="ion-item-class-2 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
|
||||||
|
<mat-form-field class="date-hour-picker d-none d-md-block">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||||
|
placeholder="Choose a date"
|
||||||
|
[(ngModel)]="eventProcess.workflowInstanceDataFields.LastOccurrence"
|
||||||
|
[disabled]="disabled"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #occurrrence
|
||||||
|
[showSpinners]="showSpinners"
|
||||||
|
[showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
|
[stepSecond]="stepSecond"
|
||||||
|
[touchUi]="touchUi"
|
||||||
|
>
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="container-div width-100">
|
<div class="container-div width-100">
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
public stepSecond = 5;
|
public stepSecond = 5;
|
||||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||||
|
recurringTypes: any;
|
||||||
|
selectedRecurringType: any;
|
||||||
|
|
||||||
showLoader = false
|
showLoader = false
|
||||||
|
|
||||||
@@ -127,12 +129,16 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
console.log('EDITAR');
|
||||||
|
|
||||||
|
|
||||||
if(this.restoreTemporaryData()){
|
if(this.restoreTemporaryData()){
|
||||||
this.setOtherData()
|
this.setOtherData()
|
||||||
} else {
|
} else {
|
||||||
this.getTask();
|
this.getTask();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.getRecurrenceTypes();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,6 +162,24 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getRecurrenceTypes() {
|
||||||
|
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
||||||
|
console.log(res);
|
||||||
|
this.recurringTypes = res;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onSelectedRecurringChanged(ev:any){
|
||||||
|
console.log(ev);
|
||||||
|
if(ev.length > 1){
|
||||||
|
console.log(ev.filter(data => data != '-1'));
|
||||||
|
this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1');
|
||||||
|
}
|
||||||
|
if(ev.length == 0){
|
||||||
|
this.eventProcess.workflowInstanceDataFields.OccurrenceType = "-1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setOtherData() {
|
setOtherData() {
|
||||||
if(this.eventProcess.workflowInstanceDataFields.ParticipantsList) {
|
if(this.eventProcess.workflowInstanceDataFields.ParticipantsList) {
|
||||||
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
|
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
|
||||||
@@ -274,6 +298,7 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
|
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(event);
|
||||||
|
|
||||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||||
this.toastService.successMessage('Evento editado');
|
this.toastService.successMessage('Evento editado');
|
||||||
|
|||||||
@@ -171,7 +171,7 @@
|
|||||||
required
|
required
|
||||||
appearance="none"
|
appearance="none"
|
||||||
>
|
>
|
||||||
<mat-select [(ngModel)]="eventProcess.workflowInstanceDataFields.OccurrenceType"
|
<mat-select [(ngModel)]="eventProcess.workflowInstanceDataFields.OccurrenceType"
|
||||||
(ngModelChange)="onSelectedRecurringChanged($event)"
|
(ngModelChange)="onSelectedRecurringChanged($event)"
|
||||||
>
|
>
|
||||||
<mat-option
|
<mat-option
|
||||||
|
|||||||
Reference in New Issue
Block a user