mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
confit
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AgendaPage } from './agenda.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: AgendaPage
|
||||
},
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AgendaPage } from './agenda.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: AgendaPage
|
||||
},
|
||||
{
|
||||
path: 'approve-event-modal',
|
||||
path: 'approve-event-modal',
|
||||
loadChildren: () => import('../gabinete-digital/event-list/approve-event-modal/approve-event-modal.module').then( m => m.ApproveEventModalPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-actions-popover',
|
||||
@@ -32,10 +33,10 @@ const routes: Routes = [
|
||||
loadChildren: () => import('./view-event/view-event.module').then( m => m.ViewEventPageModule)
|
||||
}
|
||||
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AgendaPageRoutingModule {}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
import { Component, OnInit, ViewChild, Inject, LOCALE_ID, Input } from '@angular/core';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
import { AlertController, ModalController } from '@ionic/angular';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { CalModalPage } from '../cal-modal/cal-modal.page';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { Event } from '../../models/event.model';
|
||||
import { Router, NavigationEnd } from '@angular/router';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
<<<<<<< HEAD
|
||||
import { NewEventPage } from './new-event/new-event.page';
|
||||
import { ViewEventPage } from './view-event/view-event.page';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
import { DomSanitizer } from "@angular/platform-browser";
|
||||
|
||||
=======
|
||||
import { momentG } from 'src/plugin/momentG'
|
||||
>>>>>>> 942d9528e40c789acd71990ac4a7388602c16e67
|
||||
// showTimeline
|
||||
import { setHours, setMinutes } from 'date-fns';
|
||||
import {
|
||||
@@ -19,8 +24,15 @@ import {
|
||||
CalendarView,
|
||||
DAYS_OF_WEEK,
|
||||
} from 'angular-calendar';
|
||||
<<<<<<< HEAD
|
||||
import { CustomDateFormatter } from './custom-date-formatter.provider';
|
||||
=======
|
||||
|
||||
>>>>>>> 942d9528e40c789acd71990ac4a7388602c16e67
|
||||
import { EventListPage } from '../gabinete-digital/event-list/event-list.page';
|
||||
import { CustomDateFormatter } from './custom-date-formatter.provider';
|
||||
import { ViewEventPage } from './view-event/view-event.page';
|
||||
import { NewEventPage } from './new-event/new-event.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-agenda',
|
||||
@@ -55,7 +67,6 @@ export class AgendaPage implements OnInit {
|
||||
showCalendar: boolean;
|
||||
calendarHeight: string;
|
||||
|
||||
|
||||
// for timeline
|
||||
events: CalendarEvent[] = [];
|
||||
// timeline filter
|
||||
@@ -101,6 +112,7 @@ export class AgendaPage implements OnInit {
|
||||
startTime: Date;
|
||||
endTime: Date;
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
mobileComponent: any = {
|
||||
showAddNewEvent: false,
|
||||
@@ -117,6 +129,8 @@ export class AgendaPage implements OnInit {
|
||||
saveData: {}
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> 942d9528e40c789acd71990ac4a7388602c16e67
|
||||
constructor(
|
||||
private alertCtrl: AlertController,
|
||||
@Inject(LOCALE_ID) private locale: string,
|
||||
@@ -211,7 +225,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
onCurrentChanged = (ev: Date) => {
|
||||
// timeline change date
|
||||
this.timelineDate = momentG(new Date(ev),'dd MMMM yyyy');
|
||||
this.timelineDate = new Date(ev).toLocaleString();
|
||||
this.viewDate = new Date(ev);
|
||||
// calendar change date
|
||||
this.eventSelectedDate = new Date(ev);
|
||||
@@ -222,15 +236,22 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
// changedate
|
||||
dropDownChangeDate(id: string){
|
||||
const currentCandarDayYear = momentG(this.eventSelectedDate,'dd -- yyyy', 'pt');
|
||||
/* const currentCandarDayYear = formatDate(this.eventSelectedDate,'dd -- yyyy', 'pt');
|
||||
const newDate = new Date(currentCandarDayYear.replace('--',id));
|
||||
this.onCurrentChanged(newDate);
|
||||
this.onCurrentChanged(newDate); */
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => {
|
||||
console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0));
|
||||
this.eventSelectedDate2 = ev.selectedTime;
|
||||
};
|
||||
=======
|
||||
/* onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => {
|
||||
console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0));
|
||||
this.eventSelectedDate2 = ev.selectedTime;
|
||||
}; */
|
||||
>>>>>>> 942d9528e40c789acd71990ac4a7388602c16e67
|
||||
|
||||
onRangeChanged (ev: { startTime: Date, endTime: Date }) {
|
||||
this.rangeStartDate = ev.startTime;
|
||||
@@ -389,11 +410,11 @@ export class AgendaPage implements OnInit {
|
||||
this.eventsList.forEach((element, eventIndex) => {
|
||||
|
||||
// timeline start
|
||||
const startHours = momentG(new Date(element.StartDate), 'HH', 'pt');
|
||||
const EndHours = momentG(new Date(element.EndDate), 'HH', 'pt');
|
||||
const startHours = new Date(element.StartDate).getHours().toLocaleString();
|
||||
const EndHours = new Date(element.EndDate).getHours().toLocaleString();
|
||||
|
||||
const startHoursOtherFormate = momentG(new Date(element.StartDate), 'HH:mm', 'pt');
|
||||
const EndHoursOtherFormate = momentG(new Date(element.EndDate), 'HH:mm', 'pt');
|
||||
const startHoursOtherFormate = new Date(element.StartDate).getHours().toLocaleString()+':'+new Date(element.StartDate).getMinutes().toLocaleString();
|
||||
const EndHoursOtherFormate = formatDate(new Date(element.EndDate), 'HH:mm', 'pt');
|
||||
|
||||
if (element.CalendarName == calendarName) {
|
||||
this.events.push({
|
||||
@@ -458,7 +479,7 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
});
|
||||
|
||||
this.timelineFilter(this.timelineFilterState);
|
||||
// this.timelineFilter(this.timelineFilterState);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -491,7 +512,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
});
|
||||
|
||||
this.timelineFilter(this.timelineFilterState);
|
||||
// this.timelineFilter(this.timelineFilterState);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { ApproveEventModalPage } from './approve-event-modal.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ApproveEventModalPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class ApproveEventModalPageRoutingModule {}
|
||||
@@ -1,20 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ApproveEventModalPageRoutingModule } from './approve-event-modal-routing.module';
|
||||
|
||||
import { ApproveEventModalPage } from './approve-event-modal.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
ApproveEventModalPageRoutingModule
|
||||
],
|
||||
declarations: [ApproveEventModalPage]
|
||||
})
|
||||
export class ApproveEventModalPageModule {}
|
||||
@@ -1,141 +0,0 @@
|
||||
ion-content{
|
||||
--padding-top:0px;
|
||||
--padding-start: 20px;
|
||||
--padding-end: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
ion-menu{
|
||||
--height: 225px;
|
||||
}
|
||||
.header-content{
|
||||
width: 360px;
|
||||
overflow: auto;
|
||||
margin: 25px auto;
|
||||
}
|
||||
.header-icon-left{
|
||||
width: 36px;
|
||||
font-size: 33px;
|
||||
color: #42b9fe;
|
||||
float: left;
|
||||
}
|
||||
.header-title{
|
||||
width: 264px;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
margin: 0 5px 0 5px;
|
||||
padding: 0;
|
||||
color:#000;
|
||||
float: left;
|
||||
}
|
||||
.header-icon-right{
|
||||
width: 45px;
|
||||
font-size: 45px;
|
||||
float: left;
|
||||
overflow: auto;
|
||||
}
|
||||
.upper-content{
|
||||
margin-left: 50px;
|
||||
overflow: auto;
|
||||
font-size: 18px;
|
||||
|
||||
.content-location{
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.location-detail{
|
||||
width: 210px;
|
||||
font-weight: 700;
|
||||
font-size: 18px;
|
||||
float: left;
|
||||
margin: 5px 5px 5px 0px;
|
||||
}
|
||||
.button-calendar-type{
|
||||
width: 91px;
|
||||
--border-radius: 12.5px;
|
||||
--background: #ffb703;
|
||||
margin-left: 5px;
|
||||
float: left;
|
||||
}
|
||||
.button-calendar-type ion-button{
|
||||
height: 25px;
|
||||
}
|
||||
.button-edit-event {
|
||||
width: 140px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #e0e9ee;
|
||||
--color:#061b52;
|
||||
}
|
||||
.content-details p{
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.middle-conten{
|
||||
.middle-content h3, .middle-content p{
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-content{
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
|
||||
.bottom-content h3{
|
||||
font-size: 16px;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
}
|
||||
.attach-icon{
|
||||
width: 37px;
|
||||
font-size: 35px;
|
||||
float: left;
|
||||
}
|
||||
.attach-title-item{
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color:#0d89d1;
|
||||
}
|
||||
/* SPAN */
|
||||
.span-left{
|
||||
float: left;
|
||||
font-size: 15x;
|
||||
}
|
||||
.span-right{
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons{
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.button-options {
|
||||
height: 44px;
|
||||
--color: #42b9fe;
|
||||
/* opacity: 0; */
|
||||
}
|
||||
.button-approve {
|
||||
width: 140px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #42b9fe;
|
||||
}
|
||||
.button-reject {
|
||||
width: 140px;
|
||||
height: 44px;
|
||||
--color: #d30a0a;
|
||||
border-radius: 22.5px;
|
||||
--background: #ffe0e0;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ApproveEventModalPage } from './approve-event-modal.page';
|
||||
|
||||
describe('ApproveEventModalPage', () => {
|
||||
let component: ApproveEventModalPage;
|
||||
let fixture: ComponentFixture<ApproveEventModalPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ApproveEventModalPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ApproveEventModalPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -9,6 +9,7 @@ import { ContactsPage } from './messages/contacts/contacts.page';
|
||||
import { MessagesPage } from './messages/messages.page';
|
||||
import { NewGroupPage } from './new-group/new-group.page';
|
||||
import { NewchatPage } from './newchat/newchat.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat',
|
||||
@@ -24,7 +25,7 @@ export class ChatPage implements OnInit {
|
||||
X_User_Id:any;
|
||||
X_Auth_Token:any;
|
||||
|
||||
loggedUser: any;
|
||||
private loggedUser: any;
|
||||
/* Set segment variable */
|
||||
segment:string;
|
||||
allGroups: any[];
|
||||
@@ -42,21 +43,29 @@ export class ChatPage implements OnInit {
|
||||
private chatService: ChatService,
|
||||
private modalController: ModalController,
|
||||
private authService: AuthService,
|
||||
private storage:Storage,
|
||||
|
||||
) {
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('X-User-Id', 'GqjNWiLrGEHRna7Zn');
|
||||
this.headers = this.headers.set('X-Auth-Token', 'SJwIgtlqfloPK696fpc2VBvyDluipuIHKB_0Q6-9ycJ');
|
||||
/* this.headers = this.headers.set('X-User-Id', 'GqjNWiLrGEHRna7Zn');
|
||||
this.headers = this.headers.set('X-Auth-Token', 'SJwIgtlqfloPK696fpc2VBvyDluipuIHKB_0Q6-9ycJ'); */
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = "Contactos";
|
||||
|
||||
this.authService.userData$.subscribe((res:any)=>{
|
||||
this.loggedUser=res;
|
||||
console.log(this.loggedUser);
|
||||
|
||||
});
|
||||
this.load();
|
||||
this.storage.get('userDataKey').then(val=> {
|
||||
let t = JSON.parse(unescape(atob(val)));
|
||||
this.loggedUser=t;
|
||||
this.load();
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
onSegmentChange(){
|
||||
|
||||
@@ -87,9 +87,9 @@ export class EventsPage implements OnInit {
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.profile);
|
||||
|
||||
this.storageService.get(AuthConnstants.USER).then(res=>{
|
||||
/* this.storageService.get(AuthConnstants.USER).then(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
}); */
|
||||
|
||||
this.showGreeting();
|
||||
|
||||
|
||||
+32
-19
@@ -1,12 +1,13 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/emend-message-modal.page';
|
||||
import { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popover/event-actions-popover.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EmendMessageModalPage } from '../../../agenda/emend-message-modal/emend-message-modal.page';
|
||||
import { EventActionsPopoverPage } from '../../../agenda/event-actions-popover/event-actions-popover.page';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event-modal',
|
||||
@@ -15,36 +16,45 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
})
|
||||
export class ApproveEventModalPage implements OnInit {
|
||||
event: Event;
|
||||
loadedEvent:any;
|
||||
loadedAttachments:any;
|
||||
serialNumber:string;
|
||||
customDate:any;
|
||||
today:any;
|
||||
|
||||
loadedEvent: any;
|
||||
loadedAttachments: any;
|
||||
serialNumber: string;
|
||||
customDate: any;
|
||||
today: any;
|
||||
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
|
||||
|
||||
|
||||
constructor(
|
||||
private router:Router,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes:ProcessesService,
|
||||
private processes: ProcessesService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private popoverController: PopoverController,
|
||||
private menu: MenuController,
|
||||
private alertService: AlertService,
|
||||
)
|
||||
{
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
}
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>
|
||||
{
|
||||
if (!paramMap.has("serialNumber")){
|
||||
return;
|
||||
}
|
||||
else{
|
||||
this.serialNumber = paramMap.get('serialNumber');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
@@ -55,7 +65,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
getTask(){
|
||||
this.processes.GetTask(this.serialNumber).subscribe(res => {
|
||||
console.log(res);
|
||||
console.log('GET TASK SERIALNUMBER: ', this.serialNumber,'Approve event',res);
|
||||
this.loadedEvent = res;
|
||||
this.today = new Date(res.workflowInstanceDataFields.StartDate);
|
||||
console.log(new Date(this.today));
|
||||
@@ -64,6 +74,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
})
|
||||
}
|
||||
approveTask(serialNumber:string){
|
||||
console.log('approveTask SERIALNUMBER: ', serialNumber)
|
||||
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
@@ -73,6 +84,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
}
|
||||
|
||||
emendTask(serialNumber:string){
|
||||
console.log('emendTask: ',serialNumber)
|
||||
/* console.log('Emendar'); */
|
||||
this.menu.close();
|
||||
this.openEmendMessageModal(serialNumber);
|
||||
@@ -80,7 +92,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
}
|
||||
|
||||
rejectTask(serialNumber:string){
|
||||
|
||||
console.log('rejectTask: ',serialNumber)
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
@@ -90,6 +102,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
}
|
||||
getAttachments(){
|
||||
this.attachmentsService.getAttachmentsBySerial(this.serialNumber).subscribe(res=>{
|
||||
console.log('getAttachments: ',this.serialNumber)
|
||||
this.loadedAttachments = res;
|
||||
console.log(res);
|
||||
});
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle" lines="none"
|
||||
*ngFor="let event of eventsMDGPRList" (click)="openApproveModal(event.serialNumber)">
|
||||
|
||||
<div class="content-mdgpr-{{event.workflowInstanceDataFields.Agenda}}">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.workflowInstanceDataFields.StartDate | date: 'hh:mm'}}</p>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ApproveEventModalPage } from '../../agenda/approve-event-modal/approve-event-modal.page';
|
||||
import { ApproveEventModalPage } from './approve-event-modal/approve-event-modal.page';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
|
||||
+12
@@ -32,6 +32,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Tipo" [(ngModel)]="postData.SubjectTypeId" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
|
||||
+16
-1
@@ -34,6 +34,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
taskDescription: string;
|
||||
user: string;
|
||||
loadedAttachments:any;
|
||||
subjectTypes:any;
|
||||
|
||||
postData: Despacho;
|
||||
dispatchFolder: Folder;
|
||||
@@ -65,6 +66,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
this.postData.Priority = '99999861';
|
||||
/* By Default TypeDeadline should be 'Economia' */
|
||||
this.postData.SubjectTypeId = '99999844';
|
||||
/* Initialize 'Subject' with the title of the expedient */
|
||||
this.postData.DispatchFolder.Subject = this.task.workflowInstanceFolio;
|
||||
}
|
||||
@@ -79,7 +82,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
console.log(this.task.serialNumber);
|
||||
this.getAttachments();
|
||||
|
||||
|
||||
console.log(this.getSubjectType());
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
@@ -89,6 +94,12 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
cancelTask(){
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
getSubjectType(){
|
||||
this.processes.GetSubjectType().subscribe(res=>{
|
||||
console.log(res);
|
||||
this.subjectTypes = res;
|
||||
});
|
||||
}
|
||||
saveTask(){
|
||||
console.log(this.taskType);
|
||||
|
||||
@@ -100,6 +111,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -113,6 +125,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -124,6 +137,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.user,
|
||||
SubjectTypeId: this.postData.SubjectTypeId,
|
||||
UsersSelected: this.participants,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
@@ -201,6 +215,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
|
||||
async distartExpedientModal(){
|
||||
console.log(this.task.serialNumber);
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
|
||||
+23
-26
@@ -22,18 +22,18 @@ import { momentG } from 'src/plugin/momentG'
|
||||
export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
task: any;
|
||||
fulltask:any;
|
||||
eventsList: Event[];
|
||||
serialnumber:string;
|
||||
fulltask: any;
|
||||
eventsList: Event[];
|
||||
serialnumber: string;
|
||||
profile: string;
|
||||
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
private processes:ProcessesService,
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
private attachments: AttachmentsService,
|
||||
private events: EventsService,
|
||||
private menu: MenuController,
|
||||
private router:Router,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private alertService: AlertService) {
|
||||
@@ -46,7 +46,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
console.log(this.serialnumber);
|
||||
|
||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
||||
if (!paramMap.has('SerialNumber')){
|
||||
if (!paramMap.has('SerialNumber')) {
|
||||
return;
|
||||
}
|
||||
/* this.serialnumber = paramMap.get('SerialNumber'); */
|
||||
@@ -58,8 +58,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
async LoadTaskDetail(serial:string)
|
||||
{
|
||||
async LoadTaskDetail(serial: string) {
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
this.task = {
|
||||
"SerialNumber": res.serialNumber,
|
||||
@@ -71,18 +70,16 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
this.fulltask = res;
|
||||
console.log(res);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial:string)
|
||||
{
|
||||
if (this.eventsList == null)
|
||||
{
|
||||
async LoadRelatedEvents(serial: string) {
|
||||
if (this.eventsList == null) {
|
||||
this.attachments.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
console.log(res);
|
||||
res.forEach(att =>{
|
||||
if (this.eventsList == null){
|
||||
res.forEach(att => {
|
||||
if (this.eventsList == null) {
|
||||
this.eventsList = new Array();
|
||||
}
|
||||
this.events.getEvent(att.ParentId).subscribe(event => {
|
||||
@@ -101,13 +98,13 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
this.menu.open();
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction:any, task:any){
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
},
|
||||
@@ -118,17 +115,17 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
discartExpedient(){
|
||||
discartExpedient() {
|
||||
let body = { "serialNumber": this.serialnumber, "action": "Task Completed" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task:any){
|
||||
async openBookMeetingModal(task: any) {
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
task: task,
|
||||
},
|
||||
cssClass: 'book-meeting-modal',
|
||||
@@ -138,12 +135,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async viewEventDetail(eventId:any) {
|
||||
async viewEventDetail(eventId: any) {
|
||||
console.log(this.profile);
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
eventId: eventId,
|
||||
profile: this.profile,
|
||||
},
|
||||
@@ -151,8 +148,8 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res){
|
||||
modal.onDidDismiss().then((res) => {
|
||||
if (res) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Token } from '../../models/token.model';
|
||||
|
||||
import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
||||
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
||||
|
||||
const { PushNotifications } = Plugins;
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -44,7 +44,7 @@ export class LoginPage implements OnInit {
|
||||
|
||||
}
|
||||
//Function to validade the login inputs
|
||||
validateInput() {
|
||||
validateInput(){
|
||||
return (
|
||||
this.username.trim().length > 0
|
||||
&& this.password.trim().length > 0
|
||||
@@ -78,7 +78,7 @@ export class LoginPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
storeUserIdANdToken() {
|
||||
/* storeUserIdANdToken() {
|
||||
|
||||
(PushNotifications as any).requestPermission().then(result => {
|
||||
PushNotifications.register();
|
||||
@@ -94,18 +94,16 @@ export class LoginPage implements OnInit {
|
||||
this.storageService.get(AuthConnstants.USER).then(res => {
|
||||
console.log('USERID', res);
|
||||
const headers = { 'Authorization': 'Basic cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2FsOnRhYnRlc3RlQDAwNg==' };
|
||||
const body = { UserId: res,
|
||||
const body = {
|
||||
UserId: res,
|
||||
TokenId: token.value,
|
||||
Status: 1,
|
||||
Service: 1 };
|
||||
Service: 1
|
||||
};
|
||||
|
||||
this.http.post<Token>('https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/notifications/token', body,{headers}).subscribe(data => {
|
||||
this.http.post<Token>('https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/notifications/token', body, { headers }).subscribe(data => {
|
||||
console.log('TOKEN USER MIDLE', data);
|
||||
})
|
||||
/*this.http.get<Token>('http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V4/api/notifications/user/'+res).subscribe(data => {
|
||||
console.log('TOKEN USER MIDLE',data);
|
||||
})*/
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -113,7 +111,7 @@ export class LoginPage implements OnInit {
|
||||
},
|
||||
);
|
||||
|
||||
};
|
||||
}; */
|
||||
|
||||
|
||||
async Login() {
|
||||
@@ -129,7 +127,7 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
if (await this.authService.login(this.userattempt)) {
|
||||
this.loginRocketChat();
|
||||
this.storeUserIdANdToken();
|
||||
//this.storeUserIdANdToken();
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user