mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
<ion-tab-button tab="gabinete-digital">
|
||||
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-gabinete-inactive.svg"></ion-icon>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['MDGPR'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['MDGPR'])" >{{ totalDocumentStore.count }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ totalDocumentStore.count }}</ion-badge>
|
||||
<ion-label>Gabinete</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="publications">
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ToastService } from '../services/toast.service';
|
||||
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||
import { DocumentCounterService } from 'src/app/OtherService/document-counter.service'
|
||||
import { PermissionService } from '../OtherService/permission.service';
|
||||
import { TotalDocumentService, TotalDocumentStore } from '../store/total-document.service';
|
||||
|
||||
|
||||
// import * as Sentry from "@sentry/browser";
|
||||
@@ -42,8 +43,8 @@ export class HomePage implements OnInit {
|
||||
totalExpediente = 0;
|
||||
profile: string;
|
||||
|
||||
|
||||
toDayEventStorage = ToDayEventStorage
|
||||
totalDocumentStore = TotalDocumentStore
|
||||
|
||||
adding: "intervenient" | "CC" = "intervenient";
|
||||
mobileComponent = {
|
||||
|
||||
@@ -6,7 +6,6 @@ import { Participant } from 'src/app/models/participant.model';
|
||||
import { Folder } from 'src/app/models/folder.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
@@ -20,6 +19,7 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
import { PedidoService } from 'src/app/Rules/pedido.service'
|
||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -50,7 +50,7 @@ export class CreateProcessPage implements OnInit {
|
||||
];
|
||||
taskType:string;
|
||||
task: any;
|
||||
fulltask: any
|
||||
fulltask: fullTask;
|
||||
|
||||
taskParticipants: any = [];
|
||||
taskParticipantsCc: any = [];
|
||||
@@ -121,7 +121,7 @@ export class CreateProcessPage implements OnInit {
|
||||
let SourceType;
|
||||
let SourceSecFsId;
|
||||
|
||||
if(this.task.workflowInstanceDataFields.FolderID || this.task.FolderId) {
|
||||
if(this.task.workflowInstanceDataFields.FolderID || this.task.FolderId || this.task.FolderID) {
|
||||
SourceId = this.task.workflowInstanceDataFields.FolderID
|
||||
SourceType = 'FOLDER'
|
||||
SourceSecFsId = 361
|
||||
|
||||
@@ -11,8 +11,6 @@ export class DailyWorkTask{
|
||||
Status: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export class fullTask {
|
||||
actions: null;
|
||||
activityInstanceName: string;
|
||||
@@ -30,6 +28,7 @@ export class fullTask {
|
||||
workflowID: number;
|
||||
totalDocuments: any;
|
||||
workflowInstanceDataFields: {
|
||||
DispatchNumber: any,
|
||||
AttachmentsProcessLastInstanceId: number,
|
||||
Sender: string,
|
||||
ViewerRequest: string,
|
||||
@@ -67,8 +66,20 @@ export class fullTask {
|
||||
workflowInstanceID: number
|
||||
workflowName: string
|
||||
}
|
||||
export class tasksList extends fullTask{}
|
||||
export class customTaskList {
|
||||
|
||||
export class customFullTask {
|
||||
serialNumber: string;
|
||||
taskStartDate: string;
|
||||
isEvent: true;
|
||||
workflowInstanceDataFields: {
|
||||
FsId: string,
|
||||
FolderID: number,
|
||||
DocId: number,
|
||||
Subject: string
|
||||
}
|
||||
}
|
||||
|
||||
export class customTask {
|
||||
SerialNumber: string
|
||||
Folio : string
|
||||
Senders: string
|
||||
@@ -82,4 +93,3 @@ export class customTaskList {
|
||||
activityInstanceName : string
|
||||
Status : string
|
||||
}
|
||||
export class customTask extends customTaskList{}
|
||||
+110
-24
@@ -1,7 +1,15 @@
|
||||
import { EventRecurrence } from './agenda/eventrecurrence.model';
|
||||
import { EventBody } from './eventbody.model';
|
||||
import { EventPerson } from './eventperson.model';
|
||||
|
||||
|
||||
export interface EventRecurrence {
|
||||
Type: number | string;
|
||||
Day?: number;
|
||||
DayOfWeek?: number;
|
||||
Month?: number | string;
|
||||
LastOccurrence?: Date | string;
|
||||
}
|
||||
|
||||
export class Event{
|
||||
ParentId?: string;
|
||||
EventId: string;
|
||||
@@ -29,27 +37,105 @@ export class Event{
|
||||
} */
|
||||
}
|
||||
|
||||
export class EventToApproveEdit {
|
||||
"serialNumber": "9296_86"
|
||||
"Body": "Testando"
|
||||
"Location": "Testland"
|
||||
"Subject": "Teste 0123"
|
||||
"StartDate": "2021-05-12T10:30:00"
|
||||
"EndDate": "2021-05-12T11:30:00"
|
||||
"Private": false
|
||||
"ReviewUserComment": ""
|
||||
"MDName": "Paulo Pinto"
|
||||
"OccurrenceType": "-1"
|
||||
"LastOccurrence": "2021-07-14"
|
||||
"MDEmail": "paulo.pinto@gabinetedigital.local"
|
||||
"Agenda": "Oficial" | "Pessoal"
|
||||
"EventType": "Reunião"
|
||||
"IsRecurring": false
|
||||
"IsAllDayEvent": true
|
||||
"ParticipantsList": {
|
||||
"EmailAddress": "gilson.manuel@gabinetedigital.local",
|
||||
"Name": "Gilson Manuel",
|
||||
"IsRequired": true
|
||||
}[]
|
||||
"Message": "Recebeu um novo"
|
||||
|
||||
// event to approve details ================================================
|
||||
export interface Originator {
|
||||
email: string;
|
||||
manager: string;
|
||||
displayName: string;
|
||||
fqn: string;
|
||||
username: string;
|
||||
}
|
||||
|
||||
export interface WorkflowInstanceDataFields {
|
||||
Body: string;
|
||||
Location: string;
|
||||
Subject: string;
|
||||
StartDate: string;
|
||||
EndDate: string;
|
||||
Participants?: string;
|
||||
CC?: string;
|
||||
ReviewUserComment?: string;
|
||||
Role?: number;
|
||||
MDName: string;
|
||||
MDEmail: string;
|
||||
OriginatorComments?: string;
|
||||
Status?: string;
|
||||
TimeZone?: string;
|
||||
Agenda: string;
|
||||
EventType: string;
|
||||
EventID?: string;
|
||||
IsRecurring?: any;
|
||||
HasAttachments?: boolean;
|
||||
ParticipantsList?: any;
|
||||
EventOrganizer?: string;
|
||||
CreateEvent?: string;
|
||||
IsAllDayEvent: boolean;
|
||||
SerializedItem?: string;
|
||||
MDwxUserID?: number;
|
||||
DeserializedItem?: string;
|
||||
Message: string;
|
||||
InstanceId: string;
|
||||
Header?: string;
|
||||
RecurringString?: string;
|
||||
LastOccurrence: string;
|
||||
OccurrenceType: string;
|
||||
SerialNumber?: string;
|
||||
UserEmail?: string;
|
||||
PREmail?: string;
|
||||
}
|
||||
|
||||
export interface EventToApproveDetails {
|
||||
serialNumber: string;
|
||||
originator?: Originator;
|
||||
actions?: string[];
|
||||
activityInstanceName?: string;
|
||||
workflowInstanceFolio?: string;
|
||||
taskStartDate?: string;
|
||||
workflowID?: number;
|
||||
workflowInstanceID?: number;
|
||||
workflowName?: string;
|
||||
workflowDisplayName?: string;
|
||||
formURL?: string;
|
||||
workflowInstanceDataFields: WorkflowInstanceDataFields;
|
||||
totalDocuments?: any;
|
||||
Documents?: any;
|
||||
}
|
||||
// ================================================================================
|
||||
|
||||
|
||||
// event event to approve ================
|
||||
export interface ParticipantsList {
|
||||
Id: number;
|
||||
EmailAddress: string;
|
||||
Name: string;
|
||||
IsRequired: boolean;
|
||||
}
|
||||
|
||||
|
||||
export interface EventToApproveEdit {
|
||||
SerialNumber: string;
|
||||
Body: string;
|
||||
Location: string;
|
||||
Subject: string;
|
||||
StartDate: Date | string;
|
||||
EndDate: Date | string;
|
||||
ReviewUserComment: string;
|
||||
MDName: string;
|
||||
MDEmail: string;
|
||||
IsAllDayEvent: boolean;
|
||||
Status: string;
|
||||
EventType: string;
|
||||
IsRecurring: boolean;
|
||||
ParticipantsList: ParticipantsList[];
|
||||
Message: string;
|
||||
EventRecurrence: EventRecurrence;
|
||||
Participants?: string;
|
||||
CC?: string;
|
||||
Agenda: string;
|
||||
HasAttachments?: boolean;
|
||||
EventOrganizer?: string;
|
||||
InstanceId?: string;
|
||||
}
|
||||
|
||||
// ================================================================================
|
||||
@@ -60,7 +60,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
this.postEvent = new Event();
|
||||
this.isEventEdited = false;
|
||||
this.postEvent.EventRecurrence = {Type:'-1'};
|
||||
this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''};
|
||||
this.postEvent = this.navParams.get('event');
|
||||
this.caller = this.navParams.get('caller');
|
||||
this.initCalendarName = this.postEvent.CalendarName;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AlertController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AuthConnstants } from 'src/app/config/auth-constants';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
.middle{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
width: 280px;
|
||||
width:calc(100% - 77px);
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
.right{
|
||||
@@ -60,6 +60,10 @@
|
||||
|
||||
.title{
|
||||
font-size: 25px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
float: left;
|
||||
}
|
||||
.div-icon{
|
||||
width: 40px;
|
||||
|
||||
@@ -184,6 +184,7 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
async addContacts(){
|
||||
console.log(this.members);
|
||||
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
<ion-footer>
|
||||
<div class="container width-100 d-flex">
|
||||
<div>
|
||||
<button class="btn-no-color"> <!-- (click)="openChatOptions()" -->
|
||||
<ion-icon class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
||||
<button class="btn-no-color" (click)="openChatOptions()">
|
||||
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="width-70">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
.middle{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
width: 280px;
|
||||
width:calc(100% - 77px);
|
||||
margin: 2.5px 0 0 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -70,7 +70,9 @@
|
||||
|
||||
.title{
|
||||
font-size: 25px;
|
||||
overflow: auto;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
float: left;
|
||||
}
|
||||
.div-icon{
|
||||
@@ -154,14 +156,15 @@
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 25px;
|
||||
font-size: 35px;
|
||||
float: right !important;
|
||||
margin-top: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.chat-icon-send{
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { connection } from 'src/app/services/socket/synchro.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
|
||||
import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/messages-options.page';
|
||||
@@ -28,7 +29,9 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
dmUsers:any;
|
||||
roomId:string;
|
||||
el:any;
|
||||
members:any;
|
||||
|
||||
connection = connection
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
@@ -90,7 +93,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
} catch(err) { }
|
||||
}
|
||||
|
||||
sendMessage(){
|
||||
sendMessage() {
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
@@ -103,7 +106,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
loadMessages(){
|
||||
loadMessages() {
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
||||
/* console.log(res); */
|
||||
@@ -112,9 +115,10 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
this.showLoader = false;
|
||||
})
|
||||
}
|
||||
getChatMembers(){
|
||||
getChatMembers() {
|
||||
this.showLoader = true;
|
||||
this.chatService.getMembers(this.roomId).subscribe(res=> {
|
||||
this.members = res['members'];
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.loggedUser.me.username)
|
||||
console.log(res);
|
||||
console.log(this.dmUsers);
|
||||
@@ -148,17 +152,24 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openChatOptions(ev?: any) {
|
||||
async openChatOptions(ev?: any) {
|
||||
console.log(this.members);
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: ChatOptionsPopoverPage,
|
||||
cssClass: 'chat-options-popover',
|
||||
event: ev,
|
||||
componentProps: {
|
||||
room: this.roomId,
|
||||
members: this.members,
|
||||
eventSelectedDate: new Date(),
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
async serverLongPull(){
|
||||
async serverLongPull() {
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||
|
||||
if (res == 502) {
|
||||
@@ -187,7 +198,7 @@ async openChatOptions(ev?: any) {
|
||||
//this.loadMessages()
|
||||
await this.serverLongPull();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { customFullTask, customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -30,7 +30,7 @@ export class DespachosPrPage implements OnInit {
|
||||
despachoList:any[] = [];
|
||||
deferimentoList:DailyWorkTask[] = [];
|
||||
|
||||
taskList:tasksList[] = [];
|
||||
taskList: customTask[] = [];
|
||||
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
@@ -236,7 +236,7 @@ export class DespachosPrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
async openBookMeetingModal(task: customFullTask) {
|
||||
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
|
||||
@@ -253,7 +253,7 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
@@ -271,31 +271,25 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
async distartExpedientModal() {
|
||||
// async distartExpedientModal() {
|
||||
|
||||
const doc = this.taskList[ this.dicIndex];
|
||||
// const modal = await this.modalController.create({
|
||||
// component: DiscartExpedientModalPage,
|
||||
// componentProps: {
|
||||
// action: 'complete',
|
||||
// },
|
||||
// cssClass: 'discart-expedient-modal',
|
||||
// backdropDismiss: false
|
||||
// });
|
||||
|
||||
console.log(doc, this.dicIndex, this.taskList)
|
||||
// await modal.present();
|
||||
// modal.onDidDismiss().then(res=>{
|
||||
// if(res['data']=='close'){
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: doc.serialNumber,
|
||||
folderId: doc.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
// }
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
// });
|
||||
// }
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
|
||||
@@ -3,10 +3,9 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Event } from '../../../../models/event.model';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { momentG } from 'src/plugin/momentG'
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
@@ -17,7 +16,7 @@ import { DespachosOptionsPage } from 'src/app/shared/popover/despachos-options/d
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { Location } from '@angular/common'
|
||||
import { customTask, customTaskList, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho',
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { DespachoStore } from 'src/app/store/despacho-store.service';
|
||||
import { DespachoPageStore } from 'src/app/store/despachos-page-store.service';
|
||||
|
||||
@Component({
|
||||
@@ -24,7 +23,7 @@ export class DespachosPage implements OnInit {
|
||||
despachoList:any[] = [];
|
||||
deferimentoList:DailyWorkTask[] = [];
|
||||
|
||||
taskList:tasksList[] = [];
|
||||
taskList:customTask[] = [];
|
||||
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { customTask, DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
+5
-13
@@ -19,7 +19,6 @@ import * as _moment from 'moment';
|
||||
import * as _rollupMoment from 'moment';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
|
||||
@@ -124,7 +123,6 @@ export class BookMeetingModalPage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
private calendarService: EventsService,
|
||||
authService: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
@@ -137,17 +135,12 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.postData.Body = this.eventBody;
|
||||
|
||||
/* 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 */
|
||||
/* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */
|
||||
|
||||
this.dateControlStart = new FormControl(moment(new Date()));
|
||||
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||
|
||||
|
||||
this.postData.Category = 'Reunião'
|
||||
}
|
||||
|
||||
@@ -264,8 +257,6 @@ export class BookMeetingModalPage implements OnInit {
|
||||
},
|
||||
}
|
||||
|
||||
console.log(this.postData);
|
||||
|
||||
if(this.task.FsId == '8') {
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
@@ -314,6 +305,11 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(true) {
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async addParticipants() {
|
||||
@@ -443,10 +439,6 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.taskParticipantsCc = taskParticipantsCc;
|
||||
}
|
||||
|
||||
goToGabinete() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
setIntervenient(data){
|
||||
this.taskParticipants = data;
|
||||
}
|
||||
|
||||
+2
@@ -143,6 +143,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.dispatchFolder.SourceId = this.task.workflowInstanceDataFields.DocId
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<fa-icon class="icon-selected" icon="align-justify"></fa-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Todas as tarefas</p>
|
||||
<p class="text-center exp-card-content">{{count_all_processes}} <span class="title1">Documentos</span></p>
|
||||
<p class="text-center exp-card-content">{{ totalDocumentStore.count }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||
|
||||
@@ -18,6 +18,7 @@ import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { WaitForDomService } from 'src/app/services/dom/wait-for-dom.service';
|
||||
import { TotalDocumentStore } from 'src/app/store/total-document.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-gabinete-digital',
|
||||
@@ -94,6 +95,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
pedidosstore = PedidosStore;
|
||||
expedienteprstore = ExpedienteprStore;
|
||||
despachoprstore = DespachosprStore;
|
||||
totalDocumentStore = TotalDocumentStore
|
||||
|
||||
@ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage;
|
||||
@ViewChild(PendentesPage) pendentesListPage: PendentesPage;
|
||||
@@ -211,6 +213,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
this.allProcessesList.push(task);
|
||||
this.allProcessesList = removeDuplicate( this.allProcessesList)
|
||||
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||
|
||||
this.totalDocumentStore.resetCount( this.allProcessesList.length)
|
||||
});
|
||||
|
||||
this.skeletonLoader = false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -19,8 +19,8 @@ export class PedidosPage implements OnInit {
|
||||
parecerList:any[] = [];
|
||||
fulltask:any;
|
||||
|
||||
parecerListResult:tasksList[] = [];
|
||||
deferimentoListResult:tasksList[] = [];
|
||||
parecerListResult:customTask[] = [];
|
||||
deferimentoListResult:customTask[] = [];
|
||||
|
||||
deferimentoList:any[] = [];
|
||||
taskType: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angu
|
||||
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { customTaskList, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -84,7 +84,7 @@ export class PendentesPage implements OnInit {
|
||||
let pendentesList = [];
|
||||
|
||||
pendentes.forEach(element => {
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
pendentesList.push(task);
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@ export class PendentesPage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTaskList) {
|
||||
async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTask) {
|
||||
if(WorkflowName == 'Despacho') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
@@ -206,8 +206,6 @@ export class LoginPage implements OnInit {
|
||||
|
||||
|
||||
this.localstoreService.set('UserData', userData)
|
||||
|
||||
|
||||
this.localstoreService.set('PIN', encrypted)
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { customTaskList } from '../models/dailyworktask.model';
|
||||
import { customTask } from '../models/dailyworktask.model';
|
||||
|
||||
@Pipe({
|
||||
name: 'customTask'
|
||||
})
|
||||
export class CustomTaskPipe implements PipeTransform {
|
||||
|
||||
transform(fullTask): customTaskList {
|
||||
transform(fullTask): customTask {
|
||||
|
||||
let date = new Date(fullTask.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SynchroService } from './synchro.service';
|
||||
|
||||
describe('SynchroService', () => {
|
||||
let service: SynchroService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(SynchroService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,101 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
export interface wss{
|
||||
|
||||
url: string,
|
||||
type: 'reflect' | 'emit'
|
||||
header: {
|
||||
id: string
|
||||
bluePrint: string,
|
||||
jwt: string
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SynchroService {
|
||||
[x: string]: any;
|
||||
|
||||
private connection!: WebSocket;
|
||||
private id: string = uuidv4();
|
||||
public conected = false
|
||||
private url: string = ''
|
||||
callback = function(){}
|
||||
|
||||
constructor(){}
|
||||
|
||||
setUrl() {
|
||||
|
||||
let header ={
|
||||
id:'1234',
|
||||
bluePrint: '12312123',
|
||||
jwt: uuidv4()
|
||||
}
|
||||
|
||||
let wss: wss ={
|
||||
header,
|
||||
url: 'wss://synchro-server.herokuapp.com/ws/some_url/',
|
||||
type: 'reflect'
|
||||
}
|
||||
|
||||
this.url = `${wss.url}${wss.header.id}/${wss.header.jwt}/${wss.header.bluePrint}/${this.id}/`
|
||||
}
|
||||
|
||||
connect() {
|
||||
|
||||
this.connection = new WebSocket(this.url);
|
||||
// bind function
|
||||
this.connection.onopen = this.onopen;
|
||||
this.connection.onmessage = this.onmessage;
|
||||
this.connection.onclose = this.onclose;
|
||||
this.connection.onerror = this.onerror;
|
||||
}
|
||||
|
||||
private onopen = () =>{
|
||||
console.log('open ======================= welcome to socket server')
|
||||
|
||||
}
|
||||
|
||||
public $send(object: any) {
|
||||
|
||||
let message = {
|
||||
message: '{"person.adress.country":"1Angola"}',
|
||||
username: '',
|
||||
idConnection: this.id
|
||||
}
|
||||
|
||||
let sendData = JSON.stringify(Object.assign({}, message));
|
||||
|
||||
this.connection.send(sendData);
|
||||
}
|
||||
|
||||
private onmessage = async (event: any)=> {
|
||||
this.callback()
|
||||
}
|
||||
|
||||
private onclose=(event:any)=> {
|
||||
setTimeout(() => {
|
||||
if (event.wasClean) {
|
||||
console.log(`[close] Connection closed cleanly, code=${event.code} reason=${event.reason}`);
|
||||
} else {
|
||||
// e.g. server process killed or network down
|
||||
// event.code is usually 1006 in this case
|
||||
console.log('[close] Connection died');
|
||||
console.log('Reconnect')
|
||||
this.connect()
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
private onerror=(event: any)=>{
|
||||
console.log(`[error] ${event.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const connection = new SynchroService()
|
||||
connection.setUrl()
|
||||
connection.connect()
|
||||
@@ -12,6 +12,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { EventToApproveEdit } from 'src/app/models/event.model';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -83,7 +84,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
StartDate: '',
|
||||
MDEmail: '',
|
||||
MDName: '',
|
||||
IsAllDayEvent: '',
|
||||
IsAllDayEvent: false,
|
||||
Message: ''
|
||||
}
|
||||
}
|
||||
@@ -280,7 +281,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
const event: any = {
|
||||
const event: EventToApproveEdit = {
|
||||
SerialNumber: this.eventProcess.serialNumber,
|
||||
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||
Location: this.eventProcess.workflowInstanceDataFields.Location,
|
||||
@@ -288,6 +289,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
StartDate: this.eventProcess.workflowInstanceDataFields.StartDate,
|
||||
EndDate: this.eventProcess.workflowInstanceDataFields.EndDate,
|
||||
ReviewUserComment: '',
|
||||
Agenda: this.eventProcess.workflowInstanceDataFields.Agenda,
|
||||
MDName: this.eventProcess.workflowInstanceDataFields.MDName,
|
||||
MDEmail: this.eventProcess.workflowInstanceDataFields.MDEmail,
|
||||
IsAllDayEvent: this.eventProcess.workflowInstanceDataFields.IsAllDayEvent,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
.middle{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
width: 280px;
|
||||
width:calc(100% - 77px);
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
.right{
|
||||
@@ -55,6 +55,10 @@
|
||||
|
||||
.title{
|
||||
font-size: 25px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
float: left;
|
||||
}
|
||||
.div-icon{
|
||||
width: 40px;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
.middle{
|
||||
//padding: 0!important;
|
||||
float: left;
|
||||
width: 280px;
|
||||
width:calc(100% - 77px);
|
||||
margin: 2px 0 0 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -63,7 +63,9 @@
|
||||
|
||||
.title{
|
||||
font-size: 25px;
|
||||
overflow: auto;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
float: left;
|
||||
}
|
||||
.div-icon{
|
||||
|
||||
@@ -10,6 +10,8 @@ import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/mes
|
||||
import { ProfileComponent } from '../../headers/header-no-search/profile/profile.page';
|
||||
import { ContactsPage } from '../new-group/contacts/contacts.page';
|
||||
import { Router } from '@angular/router';
|
||||
import { connection } from 'src/app/services/socket/synchro.service';
|
||||
import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/chat-options-features.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-messages',
|
||||
@@ -33,6 +35,9 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
@Input() roomId:string;
|
||||
@Input() showMessages:string;
|
||||
|
||||
|
||||
connection = connection
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
@@ -52,6 +57,17 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
this.load();
|
||||
|
||||
//throw new Error('Method not implemented.');
|
||||
|
||||
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||
|
||||
if (res == 502) {
|
||||
|
||||
} else if (res != 200) {
|
||||
this.messages = res['messages'].reverse();
|
||||
console.log(this.messages);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -79,7 +95,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
load(){
|
||||
load = ()=>{
|
||||
this.checktimeOut = true;
|
||||
this.serverLongPull();
|
||||
this.getChatMembers();
|
||||
@@ -103,7 +119,9 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
sendMessage(){
|
||||
sendMessage() {
|
||||
|
||||
this.connection.$send({})
|
||||
|
||||
let body = {
|
||||
"message":
|
||||
@@ -170,7 +188,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
}
|
||||
|
||||
openSendMessageOptions(ev?:any){
|
||||
if(window.innerWidth <= 1024){
|
||||
if(window.innerWidth < 701){
|
||||
console.log('mobile');
|
||||
this.openChatOptions(ev);
|
||||
}
|
||||
@@ -268,22 +286,10 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
/* const popover = await this.popoverController.create({
|
||||
component: MessagesOptionsPage,
|
||||
componentProps: {
|
||||
roomId: this.dm._id,
|
||||
},
|
||||
cssClass: 'messages-options',
|
||||
event: ev,
|
||||
translucent: true,
|
||||
});
|
||||
return await popover.present(); */
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: ChatOptionsPopoverPage,
|
||||
component: ChatOptionsFeaturesPage,
|
||||
cssClass: 'model profile-modal search-submodal',
|
||||
componentProps: {
|
||||
roomId: this.roomId,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit} from '@angular/core';
|
||||
|
||||
import { customTaskList} from '../../../models/dailyworktask.model';
|
||||
import { customTask} from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -69,7 +69,7 @@ constructor (
|
||||
|
||||
despachosPr.forEach( (element, index) => {
|
||||
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
|
||||
despachoList.push(task);
|
||||
});
|
||||
@@ -100,7 +100,7 @@ constructor (
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
goToDespacho({ SerialNumber } :customTaskList) {
|
||||
goToDespacho({ SerialNumber } :customTask) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { customTaskList, DailyWorkTask, fullTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask, fullTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { DespachoStore } from 'src/app/store/despacho-store.service';
|
||||
@@ -39,7 +39,7 @@ export class DespachosPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goToDespacho({ SerialNumber } :customTaskList) {
|
||||
goToDespacho({ SerialNumber } : customTask) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||
import * as moment from 'moment';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
@@ -11,7 +9,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Event } from '../../../models/event.model';
|
||||
import { Event, EventToApproveEdit } from '../../../models/event.model';
|
||||
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
|
||||
@@ -71,7 +69,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
Body: "",
|
||||
OccurrenceType: '',
|
||||
LastOccurrence: '',
|
||||
IsRecurring: false,
|
||||
ParticipantsList: [],
|
||||
Agenda: '',
|
||||
EndDate: '',
|
||||
@@ -82,8 +79,9 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
StartDate: '',
|
||||
MDEmail: '',
|
||||
MDName: '',
|
||||
IsAllDayEvent: '',
|
||||
Message: ''
|
||||
IsAllDayEvent: false,
|
||||
Message: '',
|
||||
IsRecurring: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +233,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
const event: any = {
|
||||
const event: EventToApproveEdit = {
|
||||
SerialNumber: this.eventProcess.serialNumber,
|
||||
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||
Location: this.eventProcess.workflowInstanceDataFields.Location,
|
||||
@@ -247,6 +245,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
MDEmail: this.eventProcess.workflowInstanceDataFields.MDEmail,
|
||||
IsAllDayEvent: this.eventProcess.workflowInstanceDataFields.IsAllDayEvent,
|
||||
Status: null,
|
||||
Agenda: this.eventProcess.workflowInstanceDataFields.Agenda,
|
||||
EventType: this.eventProcess.workflowInstanceDataFields.EventType,
|
||||
IsRecurring: this.eventProcess.workflowInstanceDataFields.IsRecurring,
|
||||
Message: this.eventProcess.workflowInstanceDataFields.Message,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { customTaskList, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -67,7 +67,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
this.taskslist = [];
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
res.forEach(element => {
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
this.expedienteprstore.reset(this.taskslist);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { customTaskList } from 'src/app/models/dailyworktask.model';
|
||||
import { customTask } from 'src/app/models/dailyworktask.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-list',
|
||||
@@ -8,9 +8,9 @@ import { customTaskList } from 'src/app/models/dailyworktask.model';
|
||||
})
|
||||
export class TaskListPage implements OnInit {
|
||||
|
||||
@Input() taskList: customTaskList[] = [];
|
||||
@Input() taskList: customTask[] = [];
|
||||
@Input() skeletonLoader: boolean = false
|
||||
@Output() viewTaskDetail = new EventEmitter<customTaskList>();
|
||||
@Output() viewTaskDetail = new EventEmitter<customTask>();
|
||||
|
||||
constructor() {
|
||||
console.log('taskList', this.taskList)
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angu
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { customTaskList, DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -24,8 +24,8 @@ export class PedidosPage implements OnInit {
|
||||
parecerList:any[] = [];
|
||||
fulltask:any;
|
||||
|
||||
parecerListResult:tasksList[] = [];
|
||||
deferimentoListResult:tasksList[] = [];
|
||||
parecerListResult:customTask[] = [];
|
||||
deferimentoListResult:customTask[] = [];
|
||||
|
||||
deferimentoList:any[] = [];
|
||||
taskType: string;
|
||||
@@ -90,7 +90,7 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
allParecer.filter(data => data.workflowInstanceDataFields.Status == "Active").forEach(element => {
|
||||
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
this.pedidosstore.resetparecer(this.parecerList);
|
||||
@@ -107,7 +107,7 @@ export class PedidosPage implements OnInit {
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
|
||||
res.forEach(element => {
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
this.pedidosstore.resetdeferimento(this.deferimentoList);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { customTaskList} from '../../../models/dailyworktask.model';
|
||||
import { customTask} from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { PendentesStore } from 'src/app/store/pendestes-store.service';
|
||||
@@ -55,7 +55,7 @@ export class PendentesPage implements OnInit {
|
||||
let pendentesList = [];
|
||||
|
||||
pendentes.forEach(element => {
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
pendentesList.push(task);
|
||||
});
|
||||
|
||||
@@ -79,7 +79,7 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTaskList) {
|
||||
async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTask) {
|
||||
if(WorkflowName == 'Despacho') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { customTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -17,9 +18,9 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
})
|
||||
export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
task: any;
|
||||
fulltask: any;
|
||||
serialnumber: string;
|
||||
task: customTask
|
||||
fulltask: fullTask;
|
||||
serialNumber: string;
|
||||
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
@@ -31,6 +32,9 @@ export class DespachosOptionsPage implements OnInit {
|
||||
) {
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
|
||||
|
||||
this.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -141,7 +145,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async generateDiploma(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
@@ -165,6 +169,8 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
|
||||
alert('AddNotePage')
|
||||
this.popoverController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
@@ -174,7 +180,8 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
showAttachmentBtn: true
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
@@ -220,7 +227,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async arquivar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
@@ -247,7 +254,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async executado(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -274,7 +281,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reexecutar",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<div class="solid"></div>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
<button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
@@ -322,23 +322,15 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
|
||||
// let navigationExtras: NavigationExtras = {
|
||||
// queryParams: {
|
||||
// "despachospr": true,
|
||||
// }
|
||||
// };
|
||||
|
||||
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
this.location.back()
|
||||
|
||||
this.cancle()
|
||||
}
|
||||
|
||||
cancle() {
|
||||
this.popoverController.dismiss()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -270,6 +270,8 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
fulltask: this.fulltask,
|
||||
aplicationId: 361
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
@@ -75,6 +75,7 @@ export class DeplomasService {
|
||||
}
|
||||
|
||||
saveDiplomasAssinadoList() {
|
||||
|
||||
setTimeout(()=>{
|
||||
localstoreService.set(this.keyNameDiplomasAssinado,{
|
||||
list: this._diplomasAssinadoList,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { localstoreService } from './localstore.service'
|
||||
import { AES, enc, SHA1 } from 'crypto-js'
|
||||
import { customTaskList } from '../models/dailyworktask.model';
|
||||
import { customTask } from '../models/dailyworktask.model';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -27,7 +27,7 @@ export class DespachosPageStoreService {
|
||||
|
||||
}
|
||||
|
||||
get list(): customTaskList[] {
|
||||
get list(): customTask[] {
|
||||
return this._list || []
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TotalDocumentService } from './total-document.service';
|
||||
|
||||
describe('TotalDocumentService', () => {
|
||||
let service: TotalDocumentService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(TotalDocumentService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { localstoreService } from './localstore.service'
|
||||
import { AES, enc, SHA1 } from 'crypto-js'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TotalDocumentService {
|
||||
|
||||
private _count = 0
|
||||
// local storage keyName
|
||||
private keyName: string;
|
||||
|
||||
constructor() {
|
||||
this.keyName = (SHA1(this.constructor.name)).toString()
|
||||
|
||||
setTimeout(()=> {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._count = restore.count || 0
|
||||
}, 10)
|
||||
|
||||
}
|
||||
|
||||
get count() {
|
||||
return this._count
|
||||
}
|
||||
|
||||
resetCount(value) {
|
||||
this._count = value
|
||||
}
|
||||
|
||||
saveCount() {
|
||||
setTimeout(()=> {
|
||||
localstoreService.set(this.keyName, {
|
||||
count: this._count
|
||||
})
|
||||
}, 10)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export let TotalDocumentStore = new TotalDocumentService()
|
||||
+1
-1
@@ -429,7 +429,7 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
|
||||
}
|
||||
|
||||
.modal-width-100-width-background, .modal-desktop {
|
||||
padding-top: 76px;
|
||||
padding-top: 67px;
|
||||
.modal-wrapper {
|
||||
width: 100% !important;
|
||||
height: 99% !important;
|
||||
|
||||
Reference in New Issue
Block a user