change actions date field

This commit is contained in:
Peter Maquiran
2023-09-22 18:12:48 +01:00
parent 6033ecdfb0
commit c0eee0e2b3
7 changed files with 73 additions and 50 deletions
@@ -99,7 +99,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
CalendarNamesOptions CalendarNamesOptions
testeFormDefaul = "Eudes" testeFormDefaul = "Eudes"
environment = environment environment = environment
constructor( constructor(
private modalController: ModalController, private modalController: ModalController,
private router:Router, private router:Router,
@@ -122,7 +122,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.attachments = [this.document] this.attachments = [this.document]
} }
this.document = [] this.document = []
@@ -163,8 +163,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.adding = "intervenient"; this.adding = "intervenient";
this.setDefaultTime() this.setDefaultTime()
this.getRecurrenceTypes(); this.getRecurrenceTypes();
} }
ngOnDestroy() { ngOnDestroy() {
@@ -249,17 +249,17 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.CalendarNameShow = true this.CalendarNameShow = true
if(this._eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this._eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) { if(this._eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this._eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
this.CalendarNamesOptions = ['Oficial', 'Pessoal'] this.CalendarNamesOptions = ['Oficial', 'Pessoal']
} else if (this._eventService.calendarNamesType[this.CalendarName]?.['Oficial']) { } else if (this._eventService.calendarNamesType[this.CalendarName]?.['Oficial']) {
this.CalendarNamesOptions = ['Oficial'] this.CalendarNamesOptions = ['Oficial']
this.postData.CalendarName = 'Oficial' this.postData.CalendarName = 'Oficial'
} else if (this._eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) { } else if (this._eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
this.CalendarNamesOptions = ['Pessoal'] this.CalendarNamesOptions = ['Pessoal']
this.postData.CalendarName = 'Pessoal' this.postData.CalendarName = 'Pessoal'
} else { } else {
this.CalendarNamesOptions = ['Oficial', 'Pessoal'] this.CalendarNamesOptions = ['Oficial', 'Pessoal']
} }
@@ -364,7 +364,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.setIntervenientCC(newAttendeesCC); this.setIntervenientCC(newAttendeesCC);
} }
}, (error) => { }, (error) => {
// console.log(error) console.log(error)
}); });
await modal.present() await modal.present()
@@ -390,7 +390,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
backdropDismiss: false backdropDismiss: false
}); });
modal.onDidDismiss().then((data) => { modal.onDidDismiss().then((data) => {
@@ -423,7 +423,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
select: true select: true
} }
}); });
modal.onDidDismiss().then((res)=> { modal.onDidDismiss().then((res)=> {
if(res){ if(res){
const data = res.data; const data = res.data;
@@ -460,7 +460,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
return '11:11' return '11:11'
} }
} }
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) { dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
this.taskParticipants = taskParticipants; this.taskParticipants = taskParticipants;
this.taskParticipantsCc = taskParticipantsCc; this.taskParticipantsCc = taskParticipantsCc;
@@ -485,7 +485,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
date.setSeconds(0); date.setSeconds(0);
if(minutes % 15 != 0) { if(minutes % 15 != 0) {
if (minutes > 45) { if (minutes > 45) {
date.setMinutes(60) date.setMinutes(60)
} else if (minutes > 30) { } else if (minutes > 30) {
@@ -496,7 +496,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
date.setMinutes(15) date.setMinutes(15)
} }
} }
return date return date
} }
@@ -505,7 +505,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
const _date = new Date(date); const _date = new Date(date);
const minutes = _date .getMinutes(); const minutes = _date .getMinutes();
_date .setMinutes(minutes + 15) _date .setMinutes(minutes + 15)
return _date return _date
} }
checkRoleInArray(str) { checkRoleInArray(str) {
@@ -513,4 +513,4 @@ export class DocumentSetUpMeetingPage implements OnInit {
} }
} }
@@ -62,7 +62,7 @@ export class DiplomaPage implements OnInit {
public TaskService: TaskService public TaskService: TaskService
) { ) {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
// //
if (params["params"].SerialNumber) { if (params["params"].SerialNumber) {
this.serialNumber = params["params"].SerialNumber; this.serialNumber = params["params"].SerialNumber;
@@ -106,7 +106,7 @@ export class DiplomaPage implements OnInit {
}, },
translucent: true translucent: true
}); });
popover.onDidDismiss().then(() => { popover.onDidDismiss().then(() => {
this.TaskService.loadDiplomas() this.TaskService.loadDiplomas()
}, (error) => { }, (error) => {
@@ -122,7 +122,7 @@ export class DiplomaPage implements OnInit {
async LoadTaskDetail(serial: string) { async LoadTaskDetail(serial: string) {
this.processes.GetTask(serial).subscribe(res => { this.processes.GetTask(serial).subscribe(res => {
this.TaskService.loadDiplomas(); this.TaskService.loadDiplomas();
this.task = { this.task = {
"SerialNumber": res.serialNumber, "SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceDataFields.Subject, "Folio": res.workflowInstanceDataFields.Subject,
@@ -143,7 +143,7 @@ export class DiplomaPage implements OnInit {
// this.updateProcessOnDB(res) // this.updateProcessOnDB(res)
let stringDraft = res.workflowInstanceDataFields.DraftIds; let stringDraft = res.workflowInstanceDataFields.DraftIds;
let split_stringDraft = stringDraft?.split(";").filter(Boolean); let split_stringDraft = stringDraft?.split(";").filter(Boolean);
this.mergedArray = [] this.mergedArray = []
try { try {
this.getDraft(split_stringDraft); this.getDraft(split_stringDraft);
@@ -197,7 +197,7 @@ export class DiplomaPage implements OnInit {
getFromDb() { getFromDb() {
} }
async viewDocument({Document, content}) { async viewDocument({Document, content}) {
@@ -238,8 +238,8 @@ export class DiplomaPage implements OnInit {
getDocumentDetails(forlderId: string, applicationId: string) { getDocumentDetails(forlderId: string, applicationId: string) {
this.processes.GetDocumentDetails(forlderId, applicationId).subscribe(res => { this.processes.GetDocumentDetails(forlderId, applicationId).subscribe(res => {
this.attachments = res.Documents; this.attachments = res.Documents;
}) })
} }
@@ -429,7 +429,7 @@ export class DiplomaPage implements OnInit {
} }
} }
close() { close() {
this.modalController.dismiss(); this.modalController.dismiss();
@@ -439,7 +439,7 @@ export class DiplomaPage implements OnInit {
// console.log(actionname) // console.log(actionname)
} }
async openExpedientActionsModal(taskAction: any, task: any) { async openExpedientActionsModal(taskAction: any, task: any) {
let classs; let classs;
@@ -460,7 +460,7 @@ export class DiplomaPage implements OnInit {
}); });
modal.onDidDismiss().then(async (res) => { modal.onDidDismiss().then(async (res) => {
if (res['data'] == 'openDiscart') { if (res['data'] == 'openDiscart') {
await this.distartExpedientModal(); await this.distartExpedientModal();
@@ -468,7 +468,10 @@ export class DiplomaPage implements OnInit {
this.TaskService.loadDiplomas() this.TaskService.loadDiplomas()
this.goBack(); if(taskAction != '0') {
this.goBack();
}
}, (error) => { }, (error) => {
console.log(error) console.log(error)
}); });
@@ -477,7 +480,7 @@ export class DiplomaPage implements OnInit {
} }
async distartExpedientModal() { async distartExpedientModal() {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: DiscartExpedientModalPage, component: DiscartExpedientModalPage,
componentProps: { componentProps: {
@@ -494,7 +497,7 @@ export class DiplomaPage implements OnInit {
this.TaskService.loadDiplomas() this.TaskService.loadDiplomas()
if (res['data'] == 'close') { if (res['data'] == 'close') {
this.close(); this.close();
/* /*
this.close(); this.close();
this.openMenu(); */ this.openMenu(); */
} }
@@ -33,7 +33,8 @@
[showSeconds]="showSeconds" [showSeconds]="showSeconds"
[stepHour]="1" [stepMinute]="12" [stepHour]="1" [stepMinute]="12"
[stepSecond]="stepSecond" [stepSecond]="stepSecond"
[touchUi]="touchUi"> [touchUi]="touchUi"
[hideTime]="true">
</ngx-mat-datetime-picker> </ngx-mat-datetime-picker>
</mat-form-field> </mat-form-field>
@@ -60,7 +61,8 @@
[showSeconds]="showSeconds" [showSeconds]="showSeconds"
[stepHour]="1" [stepMinute]="15" [stepHour]="1" [stepMinute]="15"
[stepSecond]="stepSecond" [stepSecond]="stepSecond"
[touchUi]="touchUi"> [touchUi]="touchUi"
[hideTime]="true">
</ngx-mat-datetime-picker> </ngx-mat-datetime-picker>
</mat-form-field> </mat-form-field>
</div> </div>
@@ -526,12 +526,9 @@ export class ChatSystemService {
for ( const user in this.users) { for ( const user in this.users) {
if(this.users[user]._id == userId) { if(this.users[user]._id == userId) {
this.users[user].status = statusText this.users[user].status = statusText
console.log('set status')
} }
} }
console.log('user status', d)
}) })
} }
@@ -549,7 +546,6 @@ export class ChatSystemService {
return "offline" return "offline"
} }
else if(text == '1') { else if(text == '1') {
console.log('oneline')
return "online" return "online"
} }
else if(text == '2') { else if(text == '2') {
@@ -24,42 +24,42 @@
<div class="header-title flex-grow-1 cursor-pointer"> <div class="header-title flex-grow-1 cursor-pointer">
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label> <label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
</div> </div>
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}"> <div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
<button class="btn-no-color"> <button class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-edit.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-edit.svg"></ion-icon>
</button> </button>
</div> </div>
<div (click)="rejectTask(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}"> <div (click)="rejectTask(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
<button class="btn-no-color" > <button class="btn-no-color" >
<ion-icon class="delete" name="trash-sharp"></ion-icon> <ion-icon class="delete" name="trash-sharp"></ion-icon>
</button> </button>
</div> </div>
</div> </div>
<div class="upper-content d-flex flex-column"> <div class="upper-content d-flex flex-column">
<div class="content-location"> <div class="content-location">
<p> <p>
<span class="location">{{loadedEvent.workflowInstanceDataFields.Location}}</span> <span class="location">{{loadedEvent.workflowInstanceDataFields.Location}}</span>
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial MDGPR' " style="background-color: #ffb703;"> <span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial MDGPR' " style="background-color: #ffb703;">
{{loadedEvent.workflowInstanceDataFields.Agenda}} {{loadedEvent.workflowInstanceDataFields.Agenda}}
</span> </span>
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal MDGPR' " style="background-color: #f05d5e;"> <span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal MDGPR' " style="background-color: #f05d5e;">
{{loadedEvent.workflowInstanceDataFields.Agenda}} {{loadedEvent.workflowInstanceDataFields.Agenda}}
</span> </span>
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial PR' " style="background-color: #99e47b;"> <span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial PR' " style="background-color: #99e47b;">
{{loadedEvent.workflowInstanceDataFields.Agenda}} {{loadedEvent.workflowInstanceDataFields.Agenda}}
</span> </span>
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal PR' " style="background-color: #958bfc;"> <span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal PR' " style="background-color: #958bfc;">
{{loadedEvent.workflowInstanceDataFields.Agenda}} {{loadedEvent.workflowInstanceDataFields.Agenda}}
</span> </span>
</p> </p>
</div> </div>
<div class="content-details"> <div class="content-details">
@@ -72,14 +72,14 @@
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 1">Semanal</span> <span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 1">Semanal</span>
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 2">Mensal</span> <span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 2">Mensal</span>
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 3">Anual</span> <span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == 3">Anual</span>
<span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == -1">(Não se repete)</span> <span *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == -1">(Não se repete)</span>
</p> </p>
</ion-label> </ion-label>
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="overflow-y-auto"> <div class="overflow-y-auto">
<div class="middle-content"> <div class="middle-content">
<div *ngIf="loadedEvent.workflowInstanceDataFields.ParticipantsList"> <div *ngIf="loadedEvent.workflowInstanceDataFields.ParticipantsList">
@@ -97,7 +97,7 @@
<div class="line"></div> <div class="line"></div>
</div> </div>
</div> </div>
<div *ngIf="loadedAttachments" class="bottom-content width-100"> <div *ngIf="loadedAttachments" class="bottom-content width-100">
<ion-list> <ion-list>
<h5 class="font-17-rem">Documentos Anexados </h5> <h5 class="font-17-rem">Documentos Anexados </h5>
@@ -131,7 +131,7 @@
<ion-footer *ngIf="loadedEvent" class="display-none-{{showAside}} ion-no-border"> <ion-footer *ngIf="loadedEvent" class="display-none-{{showAside}} ion-no-border">
<div class="buttons"> <div class="buttons">
<button *ngIf="loadedEvent.activityInstanceName != 'Editar Evento'" class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Enviar para Revisão</button> <button *ngIf="loadedEvent.activityInstanceName != 'Editar Evento'" class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Enviar para Revisão</button>
<button *ngIf="loadedEvent.activityInstanceName != 'Editar Evento'" class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button> <button *ngIf="loadedEvent.activityInstanceName != 'Editar Evento'" class="btn-cancel" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
<button *ngIf="loadedEvent.activityInstanceName == 'Editar Evento'" full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button> <button *ngIf="loadedEvent.activityInstanceName == 'Editar Evento'" full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button>
<button *ngIf="loadedEvent.activityInstanceName == 'Editar Evento'" full class="btn-delete" shape="round" (click)="rejectTask(loadedEvent.serialNumber)" >Rejeitar</button> <button *ngIf="loadedEvent.activityInstanceName == 'Editar Evento'" full class="btn-delete" shape="round" (click)="rejectTask(loadedEvent.serialNumber)" >Rejeitar</button>
</div> </div>
@@ -45,7 +45,9 @@
[showSeconds]="showSeconds" [showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute" [stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond" [stepSecond]="stepSecond"
[touchUi]="touchUi"> [touchUi]="touchUi"
[hideTime]="true"
>
</ngx-mat-datetime-picker> </ngx-mat-datetime-picker>
</mat-form-field> </mat-form-field>
@@ -83,7 +85,9 @@
[showSeconds]="showSeconds" [showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute" [stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond" [stepSecond]="stepSecond"
[touchUi]="touchUi"> [touchUi]="touchUi"
[hideTime]="true"
>
</ngx-mat-datetime-picker> </ngx-mat-datetime-picker>
</mat-form-field> </mat-form-field>
</div> </div>
@@ -6,10 +6,28 @@ import { PublicationsService } from 'src/app/services/publications.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'; import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
dateInput: "YYYY-MMMM-DD HH:mm"
},
display: {
dateInput: "DD MMM YYYY",
monthYearLabel: "MMM YYYY",
dateA11yLabel: "LL",
monthYearA11yLabel: "MMMM YYYY"
}
}
@Component({ @Component({
selector: 'app-edit-action', selector: 'app-edit-action',
templateUrl: './edit-action.page.html', templateUrl: './edit-action.page.html',
styleUrls: ['./edit-action.page.scss'], styleUrls: ['./edit-action.page.scss'],
providers: [
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
]
}) })
export class EditActionPage implements OnInit { export class EditActionPage implements OnInit {