mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
merge
This commit is contained in:
@@ -171,7 +171,7 @@
|
||||
[(ngModel)]="postData.StartDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
@@ -207,7 +207,7 @@
|
||||
[(ngModel)]="postData.EndDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #fim
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
|
||||
@@ -52,7 +52,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
public minDate = new Date();
|
||||
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepMinute = 15;
|
||||
public stepSecond = 5;
|
||||
|
||||
p: any = {}
|
||||
@@ -117,6 +117,24 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
this.postData.CalendarName = "Oficial";
|
||||
|
||||
this.postData.Category = 'Reunião'
|
||||
|
||||
if(!this.CalendarName) {
|
||||
if(this._eventService.calendarNamesAry.includes('Meu calendario')) {
|
||||
this.CalendarName = 'Meu calendario';
|
||||
console.log(this._eventService.calendarNamesAry)
|
||||
} else {
|
||||
this.CalendarName = this._eventService.calendarNamesAry[0]
|
||||
}
|
||||
}
|
||||
|
||||
if(this.taskParticipants.length == 0) {
|
||||
this.taskParticipants = [{
|
||||
EmailAddress: SessionStore.user.Email,
|
||||
IsRequired: true,
|
||||
Name: SessionStore.user.UserName
|
||||
}]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -132,8 +150,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
}
|
||||
|
||||
setDefaultTime() {
|
||||
this.postData.StartDate = new Date()
|
||||
this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
|
||||
// this.postData.StartDate = new Date()
|
||||
// this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
|
||||
}
|
||||
|
||||
close() {
|
||||
@@ -384,4 +402,46 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
|
||||
roundTimeQuarterHour() {
|
||||
var timeToReturn = new Date();
|
||||
var minutes = timeToReturn.getMinutes();
|
||||
var hours = timeToReturn.getHours();
|
||||
|
||||
var m = (Math.round(minutes/15) * 15) % 60;
|
||||
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
|
||||
|
||||
if (m == 0) {
|
||||
if(minutes > m){
|
||||
m = m + 15;
|
||||
}
|
||||
timeToReturn.setHours(h);
|
||||
timeToReturn.setMinutes(m);
|
||||
}else{
|
||||
if(minutes > m){
|
||||
|
||||
m = m + 15;
|
||||
|
||||
timeToReturn.setHours(h);
|
||||
timeToReturn.setMinutes(m);
|
||||
}else {
|
||||
timeToReturn.setHours(h);
|
||||
timeToReturn.setMinutes(m);
|
||||
}
|
||||
}
|
||||
|
||||
// console.log("AFTER IF MINUTES: " +m);
|
||||
// console.log("AFTER HOURS: " +h);
|
||||
|
||||
return timeToReturn;
|
||||
}
|
||||
|
||||
setStartDate(){
|
||||
this.postData.StartDate = this.roundTimeQuarterHour();
|
||||
}
|
||||
|
||||
setEndDate(){
|
||||
this.postData.EndDate = this.postData.StartDate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<div class="profile-header width-100">
|
||||
<div class="div-logo width-40">
|
||||
<div class="logo-icon">
|
||||
<!-- <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'> -->
|
||||
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'>
|
||||
</div>
|
||||
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
|
||||
<p class="logo-description-text tp-5">Presidente da República</p>
|
||||
<p class="logo-description-text tp-5">doneIT</p>
|
||||
<div class="add-line"></div>
|
||||
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
|
||||
</div>
|
||||
@@ -18,7 +18,7 @@
|
||||
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
|
||||
<p class="logo-description-text tp-5 color-white">Presidente da República</p>
|
||||
<p class="logo-description-text tp-5 color-white">doneIT</p>
|
||||
<div class="add-line-white"></div>
|
||||
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
|
||||
</div>
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
<div class="profile-header width-100">
|
||||
<div class="div-logo d-md-none width-40">
|
||||
<div class="logo-icon" *ngIf="hideImage">
|
||||
<!-- <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
|
||||
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'> -->
|
||||
<img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'>
|
||||
</div>
|
||||
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
|
||||
<p class="logo-description-text tp-5">Presidente da República</p>
|
||||
<p class="logo-description-text tp-5">doneIT</p>
|
||||
<div class="add-line"></div>
|
||||
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
|
||||
</div>
|
||||
@@ -17,7 +16,7 @@
|
||||
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
|
||||
<div class="logo-description-content">
|
||||
<!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
|
||||
<p class="logo-description-text tp-5 color-white">Presidente da República</p>
|
||||
<p class="logo-description-text tp-5 color-white">doneIT</p>
|
||||
<div class="add-line-white"></div>
|
||||
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
|
||||
</div>
|
||||
|
||||
@@ -9,6 +9,7 @@ import { NotificationsService } from '../../services/notifications.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventTrigger } from '../../services/eventTrigger.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -218,11 +219,12 @@ export class ProfilePage implements OnInit {
|
||||
SessionStore.setUrlBeforeInactivity(this.router.url);
|
||||
this.logoutOut == false
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
if(environment.production) {
|
||||
window.location.pathname = '/auth'
|
||||
} else {
|
||||
const pathBeforeGoOut = window.location.pathname
|
||||
this.router.navigateByUrl('/auth', { replaceUrl: true });
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
if(this.logoutOut == false || pathBeforeGoOut == window.location.pathname) {
|
||||
window.location.pathname = '/auth'
|
||||
@@ -230,8 +232,8 @@ export class ProfilePage implements OnInit {
|
||||
console.log('refresh')
|
||||
}
|
||||
}, 500)
|
||||
|
||||
}, 100)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async editProfile() {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { NavParams } from '@ionic/angular';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page';
|
||||
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
|
||||
|
||||
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AlertController, ModalController } from '@ionic/angular';
|
||||
@Component({
|
||||
selector: 'app-view-document',
|
||||
templateUrl: './view-document.page.html',
|
||||
@@ -27,6 +27,7 @@ export class ViewDocumentPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private sanitazer: DomSanitizer,
|
||||
private processes: ProcessesService,
|
||||
private alertController: AlertController,
|
||||
) {
|
||||
this.file = this.navParams.get('file');
|
||||
this.applicationId = this.navParams.get('applicationId');
|
||||
@@ -44,9 +45,27 @@ export class ViewDocumentPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=> {
|
||||
const link: string = res;
|
||||
this.processes.GetViewer(this.docId, this.applicationId).subscribe(async(res)=> {
|
||||
|
||||
const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/')
|
||||
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
|
||||
|
||||
if(res == "") {
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
//header: 'Apagar evento!',
|
||||
message: 'Sem imagem',
|
||||
buttons: [
|
||||
{
|
||||
text: 'Sim',
|
||||
handler: () => {
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
}, ()=>{
|
||||
this.close();
|
||||
});
|
||||
|
||||
@@ -153,8 +153,8 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
} else {
|
||||
|
||||
|
||||
if(this.CalendarId) {
|
||||
console.log('calendar id')
|
||||
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
@@ -172,6 +172,8 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
} else {
|
||||
console.log('no calendar id')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user