fix issues

This commit is contained in:
Peter Maquiran
2024-03-02 12:21:00 +01:00
parent e0c75e6d87
commit b1bf06b19e
23 changed files with 131 additions and 34 deletions
@@ -269,13 +269,13 @@
<div class="container-div width-100">
<div (click)="addParticipantsCC()" class="ion-item-class-2 cursor-pointer">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height d-flex">
<div class="list-people flex-grow-1">
<ion-item lines="none">
<ion-list>
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com Conhecimento*</ion-label>
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com Conhecimento</ion-label>
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
@@ -367,7 +367,7 @@
</button>
</ion-buttons>
<ion-buttons slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="cancel()">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
@@ -201,6 +201,10 @@ export class EditEventPage implements OnInit {
this.modalController.dismiss();
}
cancel() {
this.modalController.dismiss({action:'cancel'});
}
goBack() {
this.router.navigate(['/home', this.caller]);
@@ -18,6 +18,7 @@
</div>
<div class="middle d-flex align-center">
<p class="title" style="font-size: 21.1px"><span>{{loadedEvent.Subject}}</span></p>
<!-- Event details page -->
</div>
<div class="menu-options d-flex">
<button class="btn-no-color" (click)="editEvent()">
@@ -247,6 +247,37 @@ export class ViewEventPage implements OnInit {
}
loadEvent1() {
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
this.eventsService.getEvent(this.eventId).subscribe(res => {
res = this.dateService.fixDate(res as any)
this.loadedEvent = res;
this.setTimeZone()
// this.addEventToDb(res);
}, (error) => {
});
} else {
if(this.CalendarId) {
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
res = this.dateService.fixDate(res as any)
this.loadedEvent = res;
this.setTimeZone()
}, (error) => {
});
}
}
}
deleteYesOrNo() {
this.alertController.create({
header: 'Eliminar evento?',
@@ -364,14 +395,13 @@ export class ViewEventPage implements OnInit {
await modal.present();
modal.onDidDismiss().then((res) => {
if (res) {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
this.loadEvent1()
}, 250);
this.isEventEdited = true;
console.log('res', res)
console.log('res', res, res.data?.action, 'cancel')
}
});
@@ -399,7 +429,20 @@ export class ViewEventPage implements OnInit {
modal.onDidDismiss().then((res) => {
if (res) {
if (res.data?.action == 'cancel') {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent1()
}, 250);
this.isEventEdited = true;
if(res.data.Attendees?.length >= 1) {
this.loadedEvent.HasAttachments = true
this.getAttachments()
}
console.log('res', res)
} else {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
@@ -7,6 +7,7 @@
<div style="color: black;">
Evento Pendente de Aprovação
</div>
<!-- Events to approve details mobile -->
</div>
</div>
@@ -6,6 +6,7 @@ import { DeviceService } from "src/app/services/device.service"
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { PermissionService } from 'src/app/services/permission.service';
import { HeaderSettingsService } from "src/app/services/header-settings.service"
@Component({
selector: 'app-viewer-attachment',
@@ -33,6 +34,7 @@ export class ViewerAttachmentPage implements OnInit {
private erroHandler: HttpErrorHandle,
public p: PermissionService,
private processService: ProcessesService,
private HeaderSettingsService: HeaderSettingsService
) { }
ngOnInit() {
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { HeaderSettingsService } from './header-settings.service';
describe('HeaderSettingsService', () => {
let service: HeaderSettingsService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(HeaderSettingsService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
@@ -0,0 +1,11 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class HeaderSettingsService {
hideHeader = false
constructor() { }
}
@@ -9,6 +9,7 @@
<div style="color: black;">
Evento Pendente de Aprovação
</div>
<!-- List events to approve desktop -->
</div>
@@ -299,7 +299,7 @@
<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-person.svg"></ion-icon>
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height d-flex cursor-pointer" (click)="addParticipantsCC()">
<div class="list-people flex-grow-1">
@@ -309,7 +309,7 @@
display: grid;
">
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Adicionar Intervenientes</ion-label>
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com Conhecimento</ion-label>
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
@@ -12,6 +12,7 @@
.main-header{
font-family: Roboto;
background-color: #fff;
min-height: 86px;
overflow:hidden;
transform: translate3d(0, 1px, 0);
@@ -155,7 +155,7 @@ export class ViewEventPage implements OnInit {
div.innerHTML = res.Body.Text
res.Body.Text = div.innerText */
this.loadedEvent = res;
console.log('Event details',res)
// console.log('Event details',res)
this.setTimeZone()
this.today = new Date(res.StartDate);
@@ -241,13 +241,13 @@
<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-person.svg"></ion-icon>
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height d-flex" (click)="addParticipantsCC()">
<div class="list-people flex-grow-1">
<ion-item lines="none">
<ion-list>
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Adicionar Intervenientes</ion-label>
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com Conhecimento</ion-label>
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
@@ -13,7 +13,7 @@
margin-bottom: 20px;
font-family: Roboto;
background-color: #fff;
min-height: 79px;
min-height: 86px;
overflow:hidden;
transform: translate3d(0, 1px, 0);
@@ -1,5 +1,5 @@
<ion-header *ngIf="task" class="ion-no-border ">
<div *ngIf="dropButton" class="main-header mt-30 px-20">
<div [ngClass]="{'d-item': !dropButton}" class="main-header mt-30 px-20">
<div class="title-content width-100 d-flex justify-space-between align-center">
<div class=" btn-dismiss font-30-rem cursor-pointer" (click)="goBack.emit()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
@@ -28,7 +28,7 @@
</div>
<div class=" flex-1 d-flex flex-column height-100 d-flex overflow-y-auto-desktop" >
<div *ngIf="dropButton" class="upper-content" >
<div [ngClass]="{'d-item': !dropButton}" class="upper-content" >
<div class="content-details">
<div class="mobile-header">
<ion-label>
@@ -44,7 +44,7 @@
</ion-label>
</div>
</div>
<div *ngIf="dropButton" class="line mx-20"></div>
<div [ngClass]="{'d-item': !dropButton}" class="line mx-20"></div>
<div style="
display: flex;
@@ -52,7 +52,7 @@
height: 100%;
flex-grow: 1;
" class="overflow-y-auto-desktop">
<div class="middle-content" *ngIf="dropButton">
<div class="middle-content" [ngClass]="{'d-item': !dropButton}">
<h5 class="font-17-rem" *ngIf="intervenientes">Intervenientes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<ion-label>
@@ -123,12 +123,12 @@
<div style="border-radius: 50px;position: relative;top: 3px;left: 25px;">
<ion-row class="timeline-date align-center pr-10 visionMobile-flex" >
<button class="no-color" *ngIf="dropButton" (click)="dropButton=!dropButton" >
<button class="no-color" [ngClass]="{'d-item': !dropButton}" (click)="changeDropButton()" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-up.svg"></ion-icon>
</button>
<button class="no-color visionMobile-flex" *ngIf="!dropButton" (click)="dropButton=!dropButton">
<button class="no-color visionMobile-flex" *ngIf="!dropButton" (click)="changeDropButton()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-down.svg" ></ion-icon>
@@ -7,6 +7,7 @@ import { PermissionService } from 'src/app/services/permission.service';
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
import { ModalController } from '@ionic/angular';
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
import { HeaderSettingsService } from "src/app/services/header-settings.service"
@Component({
selector: 'app-task-details',
@@ -33,7 +34,8 @@ export class TaskDetailsPage implements OnInit {
public DeviceService: DeviceService,
private DocumentViewerOptionService: DocumentViewerOptionService,
public p: PermissionService,
private modalController: ModalController
private modalController: ModalController,
private HeaderSettingsService: HeaderSettingsService
) {
this.DeviceService.isDesktop();
}
@@ -129,4 +131,8 @@ export class TaskDetailsPage implements OnInit {
await modal.present();
}
changeDropButton() {
this.dropButton = !this.dropButton;
this.HeaderSettingsService.hideHeader = !this.dropButton
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
<div class="header-container header-fix">
<div class="header-container header-fix" [ngClass]="{'d-none-header':HeaderSettingsService.hideHeader}" >
<div class="main-tab pb-10 ion-toolbar header-color">
<div class="mobile pt-20 d-flex div-top-header justify-space-between">
+2
View File
@@ -177,3 +177,5 @@
.tab {
color: var(--header-tab-text-white);
}
+3 -1
View File
@@ -16,6 +16,7 @@ import { ActiveTabService } from 'src/app/services/active-tab.service';
import { NotificationsService } from 'src/app/services/notifications.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { NotificationHolderService } from 'src/app/store/notification-holder.service';
import { HeaderSettingsService } from "src/app/services/header-settings.service"
@Component({
selector: 'app-header',
@@ -59,7 +60,8 @@ export class HeaderPage implements OnInit {
private storageService: StorageService,
private zone: NgZone,
private attachmentService: AttachmentsService,
public NotificationHolderService: NotificationHolderService
public NotificationHolderService: NotificationHolderService,
public HeaderSettingsService: HeaderSettingsService
) {
this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
+1 -1
View File
@@ -4,4 +4,4 @@ import { oaprProd } from './suport/oapr'
import { DevDev } from './suport/dev'
export const environment: Environment = DevDev;
export const environment: Environment = oaprProd;
+1 -1
View File
@@ -58,7 +58,7 @@ export const DevDev: Environment = {
despachoLabel2: 'Despachos Presidênciais',
production: false,
domain: 'gabinetedigital.local',
defaultuser: 'paulo.pinto@gabinetedigital.local',
defaultuser: 'dlima@gabinetedigital.local',
defaultuserpwd: 'tabteste@006',
chatOffline: true,
presidential: true,
+7
View File
@@ -1716,3 +1716,10 @@ h5, .buttons{
height: 100%;
width: 400px;
}
@media only screen and (max-width: 1209px){
.d-none-header, .d-item {
display: none !important;
background-color: red;
}
}