mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
- Integrate combined profile events at home
-Added another button to change profile
This commit is contained in:
@@ -4,7 +4,7 @@ import { Folder } from './folder.model';
|
||||
export class Despacho{
|
||||
DistributionType: string;
|
||||
CountryCode: string;
|
||||
TypeDeadline: string;
|
||||
Priority: string;
|
||||
UserEmail: string;
|
||||
UsersSelected: Participant[];
|
||||
DispatchFolder: Folder;
|
||||
|
||||
@@ -16,7 +16,7 @@ export class EmendMessageModalPage implements OnInit {
|
||||
ngOnInit() {
|
||||
}
|
||||
close(){
|
||||
this.modalController.dismiss('');
|
||||
this.modalController.dismiss(this.emendMessage);
|
||||
}
|
||||
save(){
|
||||
this.modalController.dismiss(this.emendMessage);
|
||||
|
||||
@@ -10,13 +10,21 @@
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-buttons slot="end">
|
||||
<label class="switch">
|
||||
<!-- <label class="switch">
|
||||
<input type="checkbox" id="togBtn">
|
||||
<div (click)="showAlert()">
|
||||
<div (click)="changeProfile()">
|
||||
<div class="slider round">
|
||||
<!--ADDED HTML --><span class="mdgpr">MDGPR</span></div><span class="pr">PR</span><!--END-->
|
||||
<span class="mdgpr">MDGPR</span><span class="pr">PR</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</label> -->
|
||||
<div class="toggleBox">
|
||||
<div (click)="changeProfile()" class="toggle">
|
||||
<input type="checkbox">
|
||||
<label for="" class="onbtn">PR</label>
|
||||
<label for="" class="ofbtn">MD</label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
<ion-toolbar>
|
||||
@@ -65,7 +73,7 @@
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of eventsList"
|
||||
*ngFor="let event of combinedEvents"
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<div class="div-item-{{event.CalendarName}}">
|
||||
<div class="div-up">
|
||||
|
||||
@@ -265,3 +265,65 @@ ion-toolbar{
|
||||
padding: 15px;
|
||||
color:red;
|
||||
}
|
||||
|
||||
/* NEW CSS FOR TOGGLE BUTTON */
|
||||
input[type="checkbox"]{
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #ffffff;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 20px;
|
||||
outline: none;
|
||||
transition: .4s;
|
||||
/* box-shadow: inset 0 0 5px rgba(0,0,0,0.2); */
|
||||
cursor: pointer;
|
||||
border:1px solid red;
|
||||
}
|
||||
input:checked[type="checkbox"]{
|
||||
background: #e16817;
|
||||
}
|
||||
input[type="checkbox"]::before{
|
||||
z-index: 2;
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: 0;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
/* transform: scale(1.1); */
|
||||
box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
|
||||
border:1px solid red;
|
||||
}
|
||||
input:checked[type="checkbox"]::before{
|
||||
left: 60px;
|
||||
|
||||
}
|
||||
.toggle{
|
||||
position: relative;
|
||||
display: inline;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
display: grid;
|
||||
text-align: center;
|
||||
}
|
||||
label{
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
pointer-events: none;
|
||||
}
|
||||
.onbtn{
|
||||
top:10px;
|
||||
bottom: 15px;
|
||||
left: 15px;
|
||||
/* padding-top: 10px;
|
||||
border: 1px solid red; */
|
||||
}
|
||||
.ofbtn{
|
||||
top:10px;
|
||||
bottom: 15px;
|
||||
right: 14px;
|
||||
color: #e16817;
|
||||
}
|
||||
@@ -29,11 +29,17 @@ export class EventsPage implements OnInit {
|
||||
timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
||||
/* Set segment variable */
|
||||
segment:string;
|
||||
profile:string;
|
||||
|
||||
eventsList: Event[];
|
||||
officialeventsList: Event[];
|
||||
personaleventsList: Event[];
|
||||
|
||||
prEventList: Event[];
|
||||
mdEventList: Event[];
|
||||
|
||||
combinedEvents: Event[];
|
||||
|
||||
customText = false;
|
||||
|
||||
showLoader: boolean;
|
||||
@@ -42,11 +48,16 @@ export class EventsPage implements OnInit {
|
||||
private router: Router,
|
||||
public activatedRoute: ActivatedRoute,
|
||||
private alertController: AlertService,
|
||||
private authService: AuthService) { }
|
||||
private authService: AuthService) {
|
||||
this.prEventList = null;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "Combinada";
|
||||
//Initialize profile as mdgpr
|
||||
this.profile = "mdgpr";
|
||||
|
||||
this.showGreeting();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -56,6 +67,7 @@ export class EventsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
doRefresh(event) {
|
||||
this.RefreshEvents();
|
||||
event.target.complete();
|
||||
@@ -70,31 +82,72 @@ export class EventsPage implements OnInit {
|
||||
|
||||
RefreshEvents(){
|
||||
this.showLoader = true;
|
||||
|
||||
switch (this.segment)
|
||||
{
|
||||
case "Combinada":
|
||||
this.eventService.getAllEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59')
|
||||
if(this.profile == "mdgpr"){
|
||||
this.eventService.getAllEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59')
|
||||
.subscribe(response => {
|
||||
this.eventsList = response;
|
||||
this.combinedEvents = response;
|
||||
/* this.eventsList = response; */
|
||||
this.showLoader = false;
|
||||
}
|
||||
);
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.prEventList = res;
|
||||
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.mdEventList = res;
|
||||
this.combinedEvents = this.prEventList.concat(this.mdEventList);
|
||||
console.log(this.combinedEvents);
|
||||
this.showLoader = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
case "Pessoal":
|
||||
this.eventService.getEvents(this.segment, formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59')
|
||||
.subscribe(response => {
|
||||
if(this.profile == "mdgpr"){
|
||||
this.eventService.getEvents(this.segment, formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59')
|
||||
.subscribe(response => {
|
||||
this.personaleventsList = response;
|
||||
this.showLoader = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.prEventList = res;
|
||||
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.mdEventList = res;
|
||||
this.personaleventsList = this.prEventList.concat(this.mdEventList).filter(data => data.CalendarName == "Pessoal");
|
||||
console.log(this.personaleventsList);
|
||||
this.showLoader = false;
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case "Oficial":
|
||||
this.eventService.getEvents(this.segment, formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59')
|
||||
.subscribe(response => {
|
||||
this.officialeventsList = response;
|
||||
this.showLoader = false;
|
||||
}
|
||||
);
|
||||
if(this.profile == "mdgpr"){
|
||||
this.eventService.getEvents(this.segment, formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59')
|
||||
.subscribe(response => {
|
||||
this.officialeventsList = response;
|
||||
this.showLoader = false;
|
||||
}
|
||||
);
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.prEventList = res;
|
||||
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.mdEventList = res;
|
||||
this.officialeventsList = this.prEventList.concat(this.mdEventList).filter(data => data.CalendarName == "Oficial");
|
||||
console.log(this.officialeventsList);
|
||||
this.showLoader = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -115,8 +168,17 @@ export class EventsPage implements OnInit {
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
showAlert(){
|
||||
this.alertController.presentAlert("Funcionalidade em desenvolvimento!");
|
||||
changeProfile(){
|
||||
if(this.profile == "mdgpr"){
|
||||
console.log('pr');
|
||||
this.profile ="pr";
|
||||
this.RefreshEvents();
|
||||
}
|
||||
else{
|
||||
console.log('mdgpr');
|
||||
this.profile ="mdgpr";
|
||||
this.RefreshEvents();
|
||||
}
|
||||
}
|
||||
|
||||
logout()
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DiscartExpedientModalPage } from './discart-expedient-modal.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DiscartExpedientModalPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DiscartExpedientModalPageRoutingModule {}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DiscartExpedientModalPageRoutingModule } from './discart-expedient-modal-routing.module';
|
||||
|
||||
import { DiscartExpedientModalPage } from './discart-expedient-modal.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DiscartExpedientModalPageRoutingModule
|
||||
],
|
||||
declarations: [DiscartExpedientModalPage]
|
||||
})
|
||||
export class DiscartExpedientModalPageModule {}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="header-content">
|
||||
<div class="header-title">
|
||||
<label>Deseja eliminar este espediente?</label>
|
||||
</div>
|
||||
<div class="header-icon-left">
|
||||
<ion-icon (click)="close()" name="close-outline"></ion-icon>
|
||||
<!-- <ion-icon (click)="close()" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> -->
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<div class="buttons">
|
||||
<ion-item lines="none">
|
||||
<ion-button class="button-reject" shape="round" (click)="close()">Não</ion-button>
|
||||
<ion-button class="button-approve" shape="round" (click)="save()">Sim</ion-button>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
.header-content{
|
||||
width: 360px;
|
||||
overflow: auto;
|
||||
margin: 0 auto;
|
||||
padding: 25px;
|
||||
}
|
||||
.header-icon-left{
|
||||
width: 36px;
|
||||
font-size: 33px;
|
||||
color: #42b9fe;
|
||||
float: right;
|
||||
}
|
||||
.header-title{
|
||||
width: 264px;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
margin: 0 5px 0 5px;
|
||||
color:#000;
|
||||
float: left;
|
||||
}
|
||||
.buttons{
|
||||
width: 320px;
|
||||
margin: 0 auto;
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
.button-reject {
|
||||
width: 130px;
|
||||
height: 44px;
|
||||
--color: #d30a0a;
|
||||
border-radius: 22.5px;
|
||||
--background: #ffe0e0;
|
||||
margin: 0 12px 0 0px;
|
||||
}
|
||||
.button-approve {
|
||||
width: 130px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #42b9fe;
|
||||
margin: 0 0px 0 12px;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DiscartExpedientModalPage } from './discart-expedient-modal.page';
|
||||
|
||||
describe('DiscartExpedientModalPage', () => {
|
||||
let component: DiscartExpedientModalPage;
|
||||
let fixture: ComponentFixture<DiscartExpedientModalPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DiscartExpedientModalPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DiscartExpedientModalPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-discart-expedient-modal',
|
||||
templateUrl: './discart-expedient-modal.page.html',
|
||||
styleUrls: ['./discart-expedient-modal.page.scss'],
|
||||
})
|
||||
export class DiscartExpedientModalPage implements OnInit {
|
||||
serialNumber:string;
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private processes:ProcessesService,
|
||||
private router:Router,
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
save(){
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Task Completed" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
+29
-25
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
|
||||
@@ -13,35 +13,18 @@ export class AddParticipantsCcModalPage implements OnInit {
|
||||
contacts: EventPerson[];
|
||||
showLoader: boolean = false;
|
||||
eventPersons: EventPerson[];
|
||||
participantsAdded: any;
|
||||
|
||||
constructor(private modalController: ModalController, private contactsService: ContactsService) { }
|
||||
constructor(private modalController: ModalController,
|
||||
private contactsService: ContactsService,
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
this.participantsAdded = this.navParams.get('eventPersons');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.fetchContacts("");
|
||||
}
|
||||
async fetchContacts(filter: string) {
|
||||
this.showLoader = true;
|
||||
|
||||
this.contactsService.getContacts(filter).subscribe(result =>
|
||||
{
|
||||
if (this.eventPersons != null)
|
||||
{
|
||||
this.eventPersons.forEach(attendee => {
|
||||
const index: number = result.findIndex((cont) => {
|
||||
return cont.EmailAddress == attendee.EmailAddress
|
||||
});
|
||||
|
||||
result.splice(index, 1);
|
||||
});
|
||||
}
|
||||
|
||||
this.contacts = result;
|
||||
/* console.log(result); */
|
||||
|
||||
this.showLoader = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
onChange(evt: any) {
|
||||
this.fetchContacts(evt.detail.value);
|
||||
@@ -50,6 +33,27 @@ export class AddParticipantsCcModalPage implements OnInit {
|
||||
selectContact(itm: EventPerson){
|
||||
itm.IsRequired = !itm.IsRequired;
|
||||
}
|
||||
|
||||
async fetchContacts(filter: string) {
|
||||
this.showLoader = true;
|
||||
|
||||
this.contactsService.getContacts(filter).subscribe(result =>
|
||||
{
|
||||
if (this.participantsAdded != null)
|
||||
{
|
||||
this.participantsAdded.forEach(attendee => {
|
||||
const index: number = result.findIndex((cont) => {
|
||||
return cont.EmailAddress == attendee.UserId
|
||||
});
|
||||
|
||||
result.splice(index, 1);
|
||||
});
|
||||
}
|
||||
this.contacts = result;
|
||||
this.showLoader = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
cancelTask(){
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
+6
-4
@@ -10,10 +10,12 @@
|
||||
<ion-item-sliding>
|
||||
<ion-item *ngFor="let attendee of contacts">
|
||||
<ion-checkbox slot="end" [disabled]="isCheckboxDisabled" (ionChange)="selectContact(attendee)"></ion-checkbox>
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
<p>{{ attendee.EmailAddress }}</p>
|
||||
</ion-label>
|
||||
<!-- <div *ngFor="let part of participantsAdded"> -->
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
<p>{{ attendee.EmailAddress }}</p>
|
||||
</ion-label>
|
||||
<!-- </div> -->
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</ion-list>
|
||||
|
||||
+9
-8
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
|
||||
@@ -13,31 +13,32 @@ export class AddParticipantsModalPage implements OnInit {
|
||||
contacts: EventPerson[];
|
||||
showLoader: boolean = false;
|
||||
eventPersons: EventPerson[];
|
||||
participantsAdded: any;
|
||||
|
||||
constructor(private modalController: ModalController, private contactsService: ContactsService) { }
|
||||
constructor(private modalController: ModalController,
|
||||
private contactsService: ContactsService,
|
||||
private navParams: NavParams,) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.fetchContacts("");
|
||||
this.participantsAdded = this.navParams.get('eventPersons');
|
||||
}
|
||||
async fetchContacts(filter: string) {
|
||||
this.showLoader = true;
|
||||
|
||||
this.contactsService.getContacts(filter).subscribe(result =>
|
||||
{
|
||||
if (this.eventPersons != null)
|
||||
if (this.participantsAdded != null)
|
||||
{
|
||||
this.eventPersons.forEach(attendee => {
|
||||
this.participantsAdded.forEach(attendee => {
|
||||
const index: number = result.findIndex((cont) => {
|
||||
return cont.EmailAddress == attendee.EmailAddress
|
||||
return cont.EmailAddress == attendee.UserId
|
||||
});
|
||||
|
||||
result.splice(index, 1);
|
||||
});
|
||||
}
|
||||
|
||||
this.contacts = result;
|
||||
/* console.log(result); */
|
||||
|
||||
this.showLoader = false;
|
||||
}
|
||||
);
|
||||
|
||||
+22
-2
@@ -42,7 +42,17 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input placeholder="Data início" [(ngModel)]="postData.StartDate"></ion-input>
|
||||
<ion-datetime
|
||||
placeholder="{{postData.StartDate | date: 'dd MMM yyyy H:mm'}}"
|
||||
[(ngModel)]="postData.StartDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022"
|
||||
value="2020-11-19T11:06Z">
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data início" [(ngModel)]="postData.StartDate"></ion-input> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,7 +63,17 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input>
|
||||
<ion-datetime
|
||||
placeholder="{{postData.EndDate | date: 'dd MMM yyyy H:mm'}}"
|
||||
[(ngModel)]="postData.EndDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2018"
|
||||
max="2022"
|
||||
value="2020-11-19T11:06Z">
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+28
-12
@@ -8,6 +8,7 @@ import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-book-meeting-modal',
|
||||
@@ -39,14 +40,16 @@ export class BookMeetingModalPage implements OnInit {
|
||||
/* Initialize 'Subject' with the title of the expedient */
|
||||
this.postData.Subject = this.task.Folio;
|
||||
this.postData.CalendarName = "Oficial";
|
||||
this.postData.StartDate = new Date();
|
||||
/* Set + 30minutes to seleted datetime */
|
||||
let selectedEndDate = new Date();
|
||||
this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30));
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.task)
|
||||
console.log(this.task.SerialNumber);
|
||||
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
@@ -68,8 +71,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
Location: this.postData.Location,
|
||||
CalendarId: '',
|
||||
CalendarName: this.postData.CalendarName,
|
||||
StartDate: new Date(),
|
||||
EndDate: new Date(),
|
||||
StartDate: this.postData.StartDate,
|
||||
EndDate: this.postData.EndDate,
|
||||
EventType: 'Reunião',
|
||||
Attendees: this.eventAttendees,
|
||||
IsMeeting: false,
|
||||
@@ -82,15 +85,13 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
this.processes.GetTask(this.task.SerialNumber).subscribe(res =>{
|
||||
this.taskDocId = res.workflowInstanceDataFields.DocId;
|
||||
this.calendarService.postExpedientEvent(this.taskDocId, this.postData);
|
||||
this.processes.FindTaskDocId(this.task.SerialNumber).subscribe(res =>{
|
||||
if(res){
|
||||
/* this.calendarService.postExpedientEvent(res, this.postData); */
|
||||
}
|
||||
});
|
||||
|
||||
this.distartExpedientModal();
|
||||
this.close();
|
||||
|
||||
/* this.processes.postExpedientEvent(this.postData); */
|
||||
|
||||
}
|
||||
|
||||
async addParticipants(){
|
||||
@@ -122,12 +123,12 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.eventAttendees = new Array();
|
||||
}
|
||||
this.eventAttendees.push(att);
|
||||
|
||||
});
|
||||
}
|
||||
this.postData.Attendees = this.eventAttendees;
|
||||
});
|
||||
}
|
||||
|
||||
async addParticipantsCc(){
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsCcModalPage,
|
||||
@@ -164,4 +165,19 @@ export class BookMeetingModalPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal(){
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.task.SerialNumber,
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Prazo" [(ngModel)]="postData.TypeDeadline" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select placeholder="Prazo" [(ngModel)]="postData.Priority" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="99999861">Normal</ion-select-option>
|
||||
<ion-select-option value="99999862">Urgente</ion-select-option>
|
||||
<ion-select-option value="99999863">Muito Urgente</ion-select-option>
|
||||
@@ -93,7 +93,7 @@
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h4 class="attach-title-item">{{taskSubject}}</h4>
|
||||
<h4 class="attach-title-item">{{task.workflowInstanceFolio}}</h4>
|
||||
<p><span class="span-left">OAPR - GTI</span><span class="span-right"> {{ taskDate | date: 'dd/MM/yyyy' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
+9
-7
@@ -60,7 +60,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
this.postData.TypeDeadline = '99999861';
|
||||
this.postData.Priority = '99999861';
|
||||
/* Initialize 'Subject' with the title of the expedient */
|
||||
this.postData.DispatchFolder.Subject = this.task.workflowInstanceFolio;
|
||||
}
|
||||
@@ -91,35 +91,35 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
TypeDeadline: this.postData.TypeDeadline,
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
/* this.processes.postDespatcho(this.postData); */
|
||||
this.processes.postDespatcho(this.postData);
|
||||
break;
|
||||
case '1':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
TypeDeadline: this.postData.TypeDeadline,
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
/* this.processes.postParecer(this.postData); */
|
||||
this.processes.postParecer(this.postData);
|
||||
break;
|
||||
case '2':
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
TypeDeadline: this.postData.TypeDeadline,
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
/* this.processes.postDeferimento(this.postData); */
|
||||
this.processes.postDeferimento(this.postData);
|
||||
break;
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
@@ -130,6 +130,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.participants
|
||||
},
|
||||
cssClass: 'add-participants-modal',
|
||||
backdropDismiss: false
|
||||
@@ -162,6 +163,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsCcModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.participants
|
||||
},
|
||||
cssClass: 'add-participants-cc-modal',
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -15,7 +15,11 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./event-list/event-list.module').then( m => m.EventListPageModule)
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'discart-expedient-modal',
|
||||
loadChildren: () => import('./discart-expedient-modal/discart-expedient-modal.module').then( m => m.DiscartExpedientModalPageModule)
|
||||
},
|
||||
|
||||
|
||||
];
|
||||
|
||||
@@ -60,7 +60,7 @@ export class LoginPage implements OnInit {
|
||||
if(res.data){
|
||||
this.storageService.store(AuthConnstants.AUTH, res.data);
|
||||
console.log('Log RockectChat OK');
|
||||
console.log(res.data);
|
||||
/* console.log(res.data); */
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -34,9 +34,37 @@ export class EventsService {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Event[]>(`${geturl}`, options);
|
||||
}
|
||||
getAllPrEvents(startdate:string, enddate:string): Observable<Event[]>{
|
||||
const geturl = environment.apiURL + 'calendar/pr';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("Start", startdate);
|
||||
params = params.set("End", enddate);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.get<Event[]>(`${geturl}`, options);
|
||||
}
|
||||
getAllMdEvents(startdate:string, enddate:string): Observable<Event[]>{
|
||||
const geturl = environment.apiURL + 'calendar/md';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("Start", startdate);
|
||||
params = params.set("End", enddate);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.get<Event[]>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
getEvents(calendarname:string, startdate:string, enddate:string): Observable<Event[]>{
|
||||
const geturl = environment.apiURL + 'calendar/GetEvents';
|
||||
@@ -50,7 +78,6 @@ export class EventsService {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Event[]>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,9 +50,9 @@ export class ProcessesService {
|
||||
};
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
FindTask(serialnumber:string): Observable<any>
|
||||
FindTaskDocId(serialnumber:string): Observable<any>
|
||||
{
|
||||
const geturl = environment.apiURL + 'Tasks/FindExpedient';
|
||||
const geturl = environment.apiURL + 'Tasks/FindExpedienteDocId';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("serialNumber", serialnumber);
|
||||
|
||||
Reference in New Issue
Block a user