This commit is contained in:
Peter Maquiran
2023-04-05 15:15:42 +01:00
parent b3356a197c
commit 2b8357cece
10 changed files with 145 additions and 37 deletions
+9 -1
View File
@@ -194,7 +194,15 @@ export class HomePage implements OnInit {
throw ('User has PRES permission but not roleId');
}
if (!this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks]) && SessionStore.user.RoleID == this.RoleIdService.PRES) {
throw ('User has PRES permission but not roleId');
throw (`User doesn't have PRES permission but has roleId`);
}
if (this.p.userPermission([this.p.permissionList.Gabinete.md_tasks]) && SessionStore.user.RoleID != this.RoleIdService.PV) {
throw ('User has vice president permission but not roleId');
}
if (!this.p.userPermission([this.p.permissionList.Gabinete.md_tasks]) && SessionStore.user.RoleID == this.RoleIdService.PV) {
throw (`User doesn't has vice president permission but has roleId`);
}
}, 1000)
+31 -12
View File
@@ -21,7 +21,7 @@
<div class="calendar-container" [style.height]="calendarHeight ">
<ion-row class="ion-justify-content-between calendar-tool-tip">
<ion-row class="ion-align-items-center">
<ion-row class="ion-align-items-center first-row">
<!-- Move back one screen of the slides -->
@@ -103,8 +103,10 @@
padding-left: 10px;
padding-right: 10px;
background: #f7f7f7;
border-radius: 5px;">
<mat-form-field appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
border-radius: 5px;
margin-right: 10px;"
class="select-calendar">
<mat-form-field class="select-calendar" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="CalendarName" (selectionChange)="reloadCalendar()">
<!-- <mat-option *ngFor="let calendars of _eventService.calendarNamesAry; let i = index" value="{{calendars}}">
@@ -120,7 +122,7 @@
<div *ngIf="calendars.Role == 'Ministro e Director do Gabinete do PR'"> MDGPR </div>
<div *ngIf="calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
</div>
<div *ngIf="!environment.presidential">
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
@@ -130,7 +132,7 @@
</mat-option>
<mat-option value="PR+MDGPR" *ngIf="!environment.presidential && 99999873 == SessionStore.user.RoleID">
<mat-option value="PR+MDGPR" *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">
PR+MDGPR
</mat-option>
@@ -139,9 +141,26 @@
</div>
<div class="float-button">
<button title="Visualizar a lista de Eventos para aprovação" class="cursor-pointer resize pr-10" (click)="viewEventsToApprove()" *ngIf="p.userPermission([p.permissionList.Gabinete.aprove_event])">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event-selected.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-received-event.svg"></ion-icon>
</button>
<button *ngIf="eventService.hasAnyCalendar" title="Novo Evento" class="cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add-selected.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-add.svg"></ion-icon>
</button>
</div>
</ion-row>
<ion-row class="ion-align-items-center">
<ion-row class="ion-align-items-center calendar-options">
<!-- <div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.hasSharedCalendar && eventService.hasOwnCalendar" class="calendar-letters" [class.cal-reverse]="profile == 'mdgpr' " (click)="changeProfile()">
<div class="text" *ngIf="profile == 'mdgpr'">
@@ -164,14 +183,14 @@
</button>
-->
<button title="Visualizar a lista de Eventos para aprovação" class="btn-no-color cursor-pointer resize" (click)="viewEventsToApprove()" *ngIf="p.userPermission([p.permissionList.Gabinete.aprove_event])">
<button title="Visualizar a lista de Eventos para aprovação" class="cursor-pointer resize pr-10" (click)="viewEventsToApprove()" *ngIf="p.userPermission([p.permissionList.Gabinete.aprove_event])">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event-selected.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-received-event.svg"></ion-icon>
</button>
<button *ngIf="eventService.hasAnyCalendar" title="Novo Evento" class="btn-no-color cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
<button *ngIf="eventService.hasAnyCalendar" title="Novo Evento" class="cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add-selected.svg" ></ion-icon>
@@ -254,21 +273,21 @@
</div>
<div class="timeline-wrapper flex-grow-1 height-100" >
<div class="height-100">
<div class="timeline-container height-100 d-flex pt-20 pl-20 pl-20 filter-{{segment}}" >
<div class="timeline-container height-100 d-flex pt-10 pl-20 filter-{{segment}}" >
<div class="ss-timeline timeline-mobile flex-grow-1 pr-10 text-black height-100 width-100 overflow-y-auto" >
<div class="timeline-date align-center" *ngIf="timelineIsCurrentDate()">
<div class="timeline-date align-center" *ngIf="isSelectedDayHasEvent && hasEventToday">
<span >Hoje,&nbsp;</span> {{ timelineDate }}
</div>
<div *ngFor="let events of TimelineMDList | keyvalue; " >
<div class="EventListBox-container" >
<div class="day mt-10 " [class.dayShow]="timelineIsCurrentDate()" >
<div class="day " [class.dayShow]="isSelectedDayHasEvent && hasEventToday" >
{{ TimelineDay(events.key)}} <div style="text-transform: capitalize; display: inline;">{{ viewTitle }}</div>
</div>
<div *ngFor="let event of events.value" class="EventListBox" >
<div *ngFor="let event of events.value" class="EventListBox mb-10" >
<div class="d-flex content-{{event.profile}}-{{event.event.CalendarName}} mt-10 cursor-pointer width-100 " (click)="eventClicked(event)"
*ngIf="viewEventMonth <= dateMonth(event) ">
+64 -2
View File
@@ -357,6 +357,7 @@ td.monthview-primary-with-event {
padding: 0px;
margin: 0px;
justify-content: space-around;
text-transform: capitalize;
}
.arrow{
@@ -916,6 +917,67 @@ $font-size: 11pt;
font-weight: bold !important;
}
.ss-timeline > :nth-child(3) .dayShow {
.ss-timeline > :nth-child(2) .dayShow {
display: none;
}
}
.ss-timeline > :nth-child(1) .dayShow {
margin-top: 0px !important;
}
.calendar-options {
position: relative;
float: right;
margin-left: -100%;
button {
// top: -35px;
position: relative;
color: transparent;
background-color: transparent;
}
}
.float-button {
display: none;
}
@media only screen and (max-width: 513px) {
.calendar-options {
display: none !important;
}
.first-row {
flex-grow: 1;
.float-button {
display: block !important;
position: absolute;
float: right;
right: 15px;
top: 1px;
background: transparent;
color: transparent;
button {
background: transparent;
color: transparent;
ion-icon {
border-radius: 50px;
-webkit-border-radius: 50px;
-moz-border-radius: 50px;
-ms-border-radius: 50px;
-o-border-radius: 50px;
box-shadow: 0px 0px 10px rgb(112, 112, 112);
margin: 0px;
padding: 0px;
}
}
}
}
.select-calendar {
flex-grow: 1;
}
}
+18 -11
View File
@@ -168,6 +168,8 @@ export class AgendaPage implements OnInit {
SessionStore = SessionStore;
environment = environment
CalendarName = ''
hasEventToday = false
isSelectedDayHasEvent = true
constructor(
@Inject(LOCALE_ID) private locale: string,
@@ -241,6 +243,10 @@ export class AgendaPage implements OnInit {
console.log('SessionStore.user', SessionStore.user)
setTimeout(() =>{
console.log(this.TimelineMDList);
}, 500)
}
tigerUpdate() {
@@ -439,11 +445,6 @@ export class AgendaPage implements OnInit {
return this.viewDate.getDate()
}
// for timeline
timelineIsCurrentDate(): Boolean {
return momentG(new Date(), 'dd MMMM yyyy', 'pt') == momentG(this.eventSelectedDate, 'dd MMMM yyyy', 'pt');
}
momentG(date, formate, wgs) {
return momentG(date, formate, wgs)
}
@@ -593,10 +594,6 @@ export class AgendaPage implements OnInit {
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
this.TimelineMDList = this.listBoxService.list(this.listToPresent, label, this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
this.showTimelinePR = true;
}).finally(() => {
@@ -818,6 +815,16 @@ export class AgendaPage implements OnInit {
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
const selectedDay = momentG(this.eventSelectedDate, 'dd', 'pt');
if(this.TimelineMDList[selectedDay]) {
this.hasEventToday = true
} else {
this.hasEventToday = false
}
this.isSelectedDayHasEvent = momentG(new Date(), 'dd MMMM yyyy', 'pt') == momentG(this.eventSelectedDate, 'dd MMMM yyyy', 'pt');
}
changeYear = (year) => {
@@ -895,13 +902,13 @@ export class AgendaPage implements OnInit {
if (this.profile == "mdgpr") {
this.profile = "pr";
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
// this.updateEventListBox()
}
else {
this.profile = "mdgpr";
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
// this.updateEventListBox()
}
}
@@ -233,4 +233,9 @@ ion-item{
font-size: 45px;
float: right;
margin-right: 10px;
}
.label-deadline {
}
@@ -94,7 +94,8 @@ export class DespachosPage implements OnInit {
"Senders": workflow.Sender,
"SerialNumber": element.serialNumber,
"Status": workflow.Status,
"WorkflowName": element.workflowDisplayName
"WorkflowName": element.workflowDisplayName,
"DeadlineType": workflow.DeadlineType,
}
listtopresent.push(task);
@@ -240,3 +240,7 @@ ion-item{
left: 50%;
margin: -35px 0 0 -35px;
}
.label-deadline{
}
+2 -2
View File
@@ -56,10 +56,10 @@ export class ListBoxService {
newStracture = this.encapsulation(eventSource);
return this.display(newStracture, profile, selectedDate)
return this.display(newStracture, selectedDate)
}
display(list: CustomCalendarEvent[], profile, selectedDate) {
display(list: CustomCalendarEvent[], selectedDate) {
let days = {};
list.forEach( (event:CustomCalendarEvent, index) => {
@@ -60,7 +60,8 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label-deadline label">Deadline</span>
<span class="label mr-10">{{task.activityInstanceName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -98,7 +99,8 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label-deadline label">Deadline</span>
<span class="label mr-10">{{task.activityInstanceName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = {
"shortSHA": "936878f6c",
"SHA": "936878f6cd961e9a3bd39c7aadaa304b8976b543",
"shortSHA": "b3356a197",
"SHA": "b3356a197cab868df99b19ca9432e03edbce62a1",
"branch": "feature/agenda-layout",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Thu Mar 30 15:22:40 2023 +0100'",
"lastCommitMessage": "fix agenda",
"lastCommitNumber": "4887",
"lastCommitTime": "'Fri Mar 31 13:51:17 2023 +0100'",
"lastCommitMessage": "add drop down",
"lastCommitNumber": "4888",
"change": "",
"changeStatus": "On branch feature/agenda-layout\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/agenda/agenda.page.scss",
"changeStatus": "On branch feature/agenda-layout\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/agenda/agenda.page.scss\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.scss\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedidos.page.scss\n\tmodified: src/app/services/agenda/list-box.service.ts\n\tmodified: src/app/shared/gabinete-digital/pedidos/pedidos.page.html",
"changeAuthor": "peter.maquiran"
}