From c0eee0e2b3f6436a738cad2f09719da52f14e6b0 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Fri, 22 Sep 2023 18:12:48 +0100 Subject: [PATCH] change actions date field --- .../document-set-up-meeting.page.ts | 32 +++++++++---------- .../diplomas/diploma/diploma.page.ts | 29 +++++++++-------- .../edit-action/edit-action.page.html | 6 ++-- src/app/services/chat/chat-system.service.ts | 4 --- .../approve-event/approve-event.page.html | 26 +++++++-------- .../edit-action/edit-action.page.html | 8 +++-- .../edit-action/edit-action.page.ts | 18 +++++++++++ 7 files changed, 73 insertions(+), 50 deletions(-) diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts index 39e5c6abf..1c215bc05 100644 --- a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts @@ -99,7 +99,7 @@ export class DocumentSetUpMeetingPage implements OnInit { CalendarNamesOptions testeFormDefaul = "Eudes" environment = environment - + constructor( private modalController: ModalController, private router:Router, @@ -122,7 +122,7 @@ export class DocumentSetUpMeetingPage implements OnInit { this.attachments = [this.document] } - + this.document = [] @@ -163,8 +163,8 @@ export class DocumentSetUpMeetingPage implements OnInit { this.adding = "intervenient"; this.setDefaultTime() this.getRecurrenceTypes(); - - + + } ngOnDestroy() { @@ -249,17 +249,17 @@ export class DocumentSetUpMeetingPage implements OnInit { this.CalendarNameShow = true if(this._eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this._eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) { - + this.CalendarNamesOptions = ['Oficial', 'Pessoal'] - + } else if (this._eventService.calendarNamesType[this.CalendarName]?.['Oficial']) { this.CalendarNamesOptions = ['Oficial'] this.postData.CalendarName = 'Oficial' - + } else if (this._eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) { this.CalendarNamesOptions = ['Pessoal'] this.postData.CalendarName = 'Pessoal' - + } else { this.CalendarNamesOptions = ['Oficial', 'Pessoal'] } @@ -364,7 +364,7 @@ export class DocumentSetUpMeetingPage implements OnInit { this.setIntervenientCC(newAttendeesCC); } }, (error) => { - // console.log(error) + console.log(error) }); await modal.present() @@ -390,7 +390,7 @@ export class DocumentSetUpMeetingPage implements OnInit { backdropDismiss: false }); - + modal.onDidDismiss().then((data) => { @@ -423,7 +423,7 @@ export class DocumentSetUpMeetingPage implements OnInit { select: true } }); - + modal.onDidDismiss().then((res)=> { if(res){ const data = res.data; @@ -460,7 +460,7 @@ export class DocumentSetUpMeetingPage implements OnInit { return '11:11' } } - + dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) { this.taskParticipants = taskParticipants; this.taskParticipantsCc = taskParticipantsCc; @@ -485,7 +485,7 @@ export class DocumentSetUpMeetingPage implements OnInit { date.setSeconds(0); if(minutes % 15 != 0) { - + if (minutes > 45) { date.setMinutes(60) } else if (minutes > 30) { @@ -496,7 +496,7 @@ export class DocumentSetUpMeetingPage implements OnInit { date.setMinutes(15) } - } + } return date } @@ -505,7 +505,7 @@ export class DocumentSetUpMeetingPage implements OnInit { const _date = new Date(date); const minutes = _date .getMinutes(); _date .setMinutes(minutes + 15) - return _date + return _date } checkRoleInArray(str) { @@ -513,4 +513,4 @@ export class DocumentSetUpMeetingPage implements OnInit { } -} \ No newline at end of file +} diff --git a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts index 522fed760..e348f703e 100644 --- a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts +++ b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts @@ -62,7 +62,7 @@ export class DiplomaPage implements OnInit { public TaskService: TaskService ) { this.activatedRoute.paramMap.subscribe(params => { - // + // if (params["params"].SerialNumber) { this.serialNumber = params["params"].SerialNumber; @@ -106,7 +106,7 @@ export class DiplomaPage implements OnInit { }, translucent: true }); - + popover.onDidDismiss().then(() => { this.TaskService.loadDiplomas() }, (error) => { @@ -122,7 +122,7 @@ export class DiplomaPage implements OnInit { async LoadTaskDetail(serial: string) { this.processes.GetTask(serial).subscribe(res => { this.TaskService.loadDiplomas(); - + this.task = { "SerialNumber": res.serialNumber, "Folio": res.workflowInstanceDataFields.Subject, @@ -143,7 +143,7 @@ export class DiplomaPage implements OnInit { // this.updateProcessOnDB(res) let stringDraft = res.workflowInstanceDataFields.DraftIds; let split_stringDraft = stringDraft?.split(";").filter(Boolean); - + this.mergedArray = [] try { this.getDraft(split_stringDraft); @@ -197,7 +197,7 @@ export class DiplomaPage implements OnInit { getFromDb() { - + } async viewDocument({Document, content}) { @@ -238,8 +238,8 @@ export class DiplomaPage implements OnInit { getDocumentDetails(forlderId: string, applicationId: string) { this.processes.GetDocumentDetails(forlderId, applicationId).subscribe(res => { this.attachments = res.Documents; - - + + }) } @@ -429,7 +429,7 @@ export class DiplomaPage implements OnInit { } } - + close() { this.modalController.dismiss(); @@ -439,7 +439,7 @@ export class DiplomaPage implements OnInit { // console.log(actionname) } - + async openExpedientActionsModal(taskAction: any, task: any) { let classs; @@ -460,7 +460,7 @@ export class DiplomaPage implements OnInit { }); modal.onDidDismiss().then(async (res) => { - + if (res['data'] == 'openDiscart') { await this.distartExpedientModal(); @@ -468,7 +468,10 @@ export class DiplomaPage implements OnInit { this.TaskService.loadDiplomas() - this.goBack(); + if(taskAction != '0') { + this.goBack(); + } + }, (error) => { console.log(error) }); @@ -477,7 +480,7 @@ export class DiplomaPage implements OnInit { } async distartExpedientModal() { - + const modal = await this.modalController.create({ component: DiscartExpedientModalPage, componentProps: { @@ -494,7 +497,7 @@ export class DiplomaPage implements OnInit { this.TaskService.loadDiplomas() if (res['data'] == 'close') { this.close(); - /* + /* this.close(); this.openMenu(); */ } diff --git a/src/app/pages/publications/edit-action/edit-action.page.html b/src/app/pages/publications/edit-action/edit-action.page.html index 4aa50f747..2f4c41de7 100644 --- a/src/app/pages/publications/edit-action/edit-action.page.html +++ b/src/app/pages/publications/edit-action/edit-action.page.html @@ -33,7 +33,8 @@ [showSeconds]="showSeconds" [stepHour]="1" [stepMinute]="12" [stepSecond]="stepSecond" - [touchUi]="touchUi"> + [touchUi]="touchUi" + [hideTime]="true"> @@ -60,7 +61,8 @@ [showSeconds]="showSeconds" [stepHour]="1" [stepMinute]="15" [stepSecond]="stepSecond" - [touchUi]="touchUi"> + [touchUi]="touchUi" + [hideTime]="true"> diff --git a/src/app/services/chat/chat-system.service.ts b/src/app/services/chat/chat-system.service.ts index f8a0e97d2..1e53e1491 100644 --- a/src/app/services/chat/chat-system.service.ts +++ b/src/app/services/chat/chat-system.service.ts @@ -526,12 +526,9 @@ export class ChatSystemService { for ( const user in this.users) { if(this.users[user]._id == userId) { this.users[user].status = statusText - console.log('set status') } } - console.log('user status', d) - }) } @@ -549,7 +546,6 @@ export class ChatSystemService { return "offline" } else if(text == '1') { - console.log('oneline') return "online" } else if(text == '2') { diff --git a/src/app/shared/agenda/approve-event/approve-event.page.html b/src/app/shared/agenda/approve-event/approve-event.page.html index 23a9046ce..7eb86b176 100644 --- a/src/app/shared/agenda/approve-event/approve-event.page.html +++ b/src/app/shared/agenda/approve-event/approve-event.page.html @@ -24,42 +24,42 @@
- +
- +
- +

{{loadedEvent.workflowInstanceDataFields.Location}} - + {{loadedEvent.workflowInstanceDataFields.Agenda}} {{loadedEvent.workflowInstanceDataFields.Agenda}} - - + + {{loadedEvent.workflowInstanceDataFields.Agenda}} {{loadedEvent.workflowInstanceDataFields.Agenda}} - +

@@ -72,14 +72,14 @@ Semanal Mensal Anual - (Não se repete) + (Não se repete)

- +
- +
@@ -97,7 +97,7 @@
- +
Documentos Anexados
@@ -131,7 +131,7 @@
- +
diff --git a/src/app/shared/publication/edit-action/edit-action.page.html b/src/app/shared/publication/edit-action/edit-action.page.html index 61664aa6e..083a6d005 100644 --- a/src/app/shared/publication/edit-action/edit-action.page.html +++ b/src/app/shared/publication/edit-action/edit-action.page.html @@ -45,7 +45,9 @@ [showSeconds]="showSeconds" [stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" - [touchUi]="touchUi"> + [touchUi]="touchUi" + [hideTime]="true" + > @@ -83,7 +85,9 @@ [showSeconds]="showSeconds" [stepHour]="stepHour" [stepMinute]="stepMinute" [stepSecond]="stepSecond" - [touchUi]="touchUi"> + [touchUi]="touchUi" + [hideTime]="true" + >
diff --git a/src/app/shared/publication/edit-action/edit-action.page.ts b/src/app/shared/publication/edit-action/edit-action.page.ts index 4cc5a7b69..404cffdf0 100644 --- a/src/app/shared/publication/edit-action/edit-action.page.ts +++ b/src/app/shared/publication/edit-action/edit-action.page.ts @@ -6,10 +6,28 @@ import { PublicationsService } from 'src/app/services/publications.service'; import { ToastService } from 'src/app/services/toast.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({ selector: 'app-edit-action', templateUrl: './edit-action.page.html', styleUrls: ['./edit-action.page.scss'], + providers: [ + { provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS }, + ] }) export class EditActionPage implements OnInit {