mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -42,10 +42,7 @@
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
<ion-item hidden lines="none">
|
||||
<ion-textarea [(ngModel)]="note" rows="4" cols="20" placeholder="Adicionar um comentário para execução..."></ion-textarea>
|
||||
</ion-item>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-footer class="ion-no-border">
|
||||
<div class="buttons width-100">
|
||||
|
||||
@@ -2,8 +2,6 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-note',
|
||||
@@ -12,7 +10,7 @@ import { SuccessMessagePage } from 'src/app/shared/popover/success-message/succe
|
||||
})
|
||||
export class AddNotePage implements OnInit {
|
||||
note: string = '';
|
||||
documents:SearchDocument[] = [];
|
||||
documents: SearchDocument[] = [];
|
||||
loadedAttachments:any;
|
||||
hideThisFeature: boolean = true;
|
||||
|
||||
@@ -32,11 +30,11 @@ export class AddNotePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.modalController.dismiss('');
|
||||
}
|
||||
|
||||
save(){
|
||||
save() {
|
||||
let body = {
|
||||
"note":this.note,
|
||||
"documents":this.documents,
|
||||
|
||||
@@ -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 = [];
|
||||
@@ -101,6 +101,10 @@ export class CreateProcessPage implements OnInit {
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
this.task = this.navParams.get('task');
|
||||
|
||||
if (this.task.SerialNumber) {
|
||||
this.task.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
|
||||
@@ -121,7 +125,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
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div hidden class="ion-item-container-no-border">
|
||||
<ion-label>
|
||||
<div *ngIf="hideThisFeature" class="ion-item-container-no-border">
|
||||
<ion-label (click)="getDoc()">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -52,18 +52,23 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loadedAttachments">
|
||||
<ion-item>
|
||||
<ion-label>Documentos Anexados</ion-label>
|
||||
</ion-item>
|
||||
<ion-list>
|
||||
<ion-item *ngFor="let attachment of loadedAttachments">
|
||||
<ion-label>
|
||||
<h4 class="attach-title-item">{{attachment.Description}}</h4>
|
||||
<p><span class="span-left">{{attachment.Stakeholders}}</span><span class="span-right"> {{ attachment.CreateDate | date: 'dd/MM/yyyy' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
<div class="content width-100 overflow-y-auto height-100">
|
||||
<div class="list">
|
||||
<ion-list *ngFor="let document of documents; let i = index">
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.Assunto}}</span>
|
||||
<span class="app-name">{{document.appName}}</span>
|
||||
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
</p>
|
||||
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yyyy HH:mm'}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ import { EventsService } from 'src/app/services/events.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-delegar',
|
||||
@@ -38,6 +38,9 @@ export class DelegarPage implements OnInit {
|
||||
formLocationSatus: boolean = false;
|
||||
showAttendees= false;
|
||||
|
||||
hideThisFeature: boolean = true;
|
||||
documents: SearchDocument[] = [];
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private router:Router,
|
||||
@@ -63,6 +66,7 @@ export class DelegarPage implements OnInit {
|
||||
let selectedEndDate = new Date();
|
||||
/* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */
|
||||
|
||||
this.hideThisFeature = this.navParams.get('showAttachmentBtn');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -187,4 +191,32 @@ export class DelegarPage implements OnInit {
|
||||
this.taskParticipants = taskParticipants;
|
||||
}
|
||||
|
||||
|
||||
async getDoc() {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
cssClass: 'modal-width-100-width-background modal',
|
||||
componentProps: {
|
||||
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||
showSearchInput: true,
|
||||
select: true
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res){
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
removeAttachment(index: number){
|
||||
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -70,10 +70,12 @@ export class DocumentDetailPage implements OnInit {
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: folder.ApplicationID || folder.ApplicationId,
|
||||
FolderID: folder['FolderId'] || folder['FolderID'] || folder.folderId,
|
||||
DocId: folder.DispatchNumber, // not used
|
||||
Subject: folder.Assunto
|
||||
Subject: folder.Assunto,
|
||||
SourceSecFsID: folder.ApplicationID || folder['ApplicationId'],
|
||||
SourceType: 'FOLDER',
|
||||
SourceID: folder.folderId,
|
||||
DispatchNumber: folder.DispatchNumber
|
||||
},
|
||||
}
|
||||
} else if (document.ApplicationID == 8 || document.ApplicationId == 8) {
|
||||
@@ -82,10 +84,12 @@ export class DocumentDetailPage implements OnInit {
|
||||
taskStartDate: document.DocDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: document.ApplicationID || document.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: document.DocId || document['DocID'],
|
||||
Subject: document.Assunto
|
||||
Subject: document.Assunto,
|
||||
DispatchNumber: null,
|
||||
SourceSecFsID: document.ApplicationID || document.ApplicationId,
|
||||
SourceType: 'DOC',
|
||||
SourceID: document.DocId,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -42,33 +42,7 @@ export class ProfilePage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
|
||||
var data = JSON.parse(value);
|
||||
data.forEach((element, i) => {
|
||||
console.log("ARaaAA", element)
|
||||
var payload = JSON.parse(element.payload)
|
||||
let notificationObject = {
|
||||
index: i,
|
||||
alert: element.alert,
|
||||
Service: payload.Service,
|
||||
Object: payload.Object,
|
||||
IdObject: payload.IdObject,
|
||||
FolderId: payload.FolderId,
|
||||
desc: payload.desc,
|
||||
dateInit: payload.dateInit,
|
||||
dateEnd: payload.dateEnd,
|
||||
Location: payload.Location,
|
||||
TypeAgenda: payload.TypeAgenda,
|
||||
Status: payload.Status
|
||||
}
|
||||
|
||||
this.DataArray.push(notificationObject)
|
||||
});
|
||||
this.notificationdata = this.DataArray
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
})
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
this.getNotificationData();
|
||||
|
||||
}
|
||||
|
||||
@@ -78,6 +52,61 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
notImplemented() { }
|
||||
|
||||
async getNotificationData(){
|
||||
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
console.log("Init get store", value)
|
||||
|
||||
var data = JSON.parse(value);
|
||||
console.log("Init store parse", data)
|
||||
data.forEach((element,i) => {
|
||||
console.log("ARaaAA", element)
|
||||
let notificationObject;
|
||||
if(element.payload){
|
||||
var payload = JSON.parse(element.payload)
|
||||
notificationObject = {
|
||||
index: i,
|
||||
alert: element.alert,
|
||||
Service: payload.Service,
|
||||
Object: payload.Object,
|
||||
IdObject: payload.IdObject,
|
||||
FolderId: payload.FolderId,
|
||||
desc: payload.desc,
|
||||
dateInit: payload.dateInit,
|
||||
dateEnd: payload.dateEnd,
|
||||
Location: payload.Location,
|
||||
TypeAgenda: payload.TypeAgenda,
|
||||
Status: payload.Status
|
||||
}
|
||||
} else {
|
||||
notificationObject = {
|
||||
index: i,
|
||||
alert: element.alert,
|
||||
Service: element.Service,
|
||||
Object: element.Object,
|
||||
IdObject: element.IdObject,
|
||||
FolderId: element.FolderId,
|
||||
desc: element.desc,
|
||||
dateInit: element.dateInit,
|
||||
dateEnd: element.dateEnd,
|
||||
Location: element.Location,
|
||||
TypeAgenda: element.TypeAgenda,
|
||||
Status: element.Status
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.DataArray.push(notificationObject)
|
||||
});
|
||||
this.notificationdata = this.DataArray
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
})
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
/* await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.getNotificationData(); */
|
||||
console.log('Timer badge count')
|
||||
}
|
||||
|
||||
notificatinsRoutes = (index, Service, Object, IdObject, FolderId) => {
|
||||
if (Service === "agenda") {
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda']));
|
||||
@@ -124,16 +153,21 @@ export class ProfilePage implements OnInit {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
|
||||
const indexx = this.notificationdata.indexOf(index, 0);
|
||||
if (indexx > -1) {
|
||||
this.notificationdata.splice(index, 1);
|
||||
console.log('This notificatio', this.notificationdata);
|
||||
}
|
||||
this.deleteNotification(index);
|
||||
|
||||
|
||||
}
|
||||
|
||||
deleteNotification(index){
|
||||
console.log("Delete notification first stata", this.notificationdata)
|
||||
this.notificationdata = this.notificationdata.filter(item=>item.index !=index );
|
||||
|
||||
this.notificationservice.removeDepartment(index);
|
||||
console.log('This notificatio 2', this.notificationdata);
|
||||
|
||||
|
||||
this.storageservice.store("Notifications",JSON.stringify(this.notificationdata)).then(() =>{
|
||||
this.storageservice.get("Notifications").then((value) =>{
|
||||
console.log("notfication state", value, )
|
||||
});
|
||||
});
|
||||
console.log("Delete notification last stata", this.notificationdata)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
export class Excludetask{
|
||||
serialNumber: any;
|
||||
export interface Attachment {
|
||||
SourceId: string;
|
||||
ApplicationId: number;
|
||||
}
|
||||
export interface AttachmentList {
|
||||
ProcessInstanceID?: string;
|
||||
Attachments?: Attachment[];
|
||||
}
|
||||
export interface Excludetask {
|
||||
serialNumber: string;
|
||||
action: string;
|
||||
ActionTypeId: any;
|
||||
ActionTypeId?: number;
|
||||
dataFields: {
|
||||
ReviewUserComment?: string,
|
||||
Note?: any
|
||||
}
|
||||
AttachmentList?: any
|
||||
FolderId?: number;
|
||||
AttachmentList?: AttachmentList | any;
|
||||
}
|
||||
@@ -5,12 +5,12 @@ export class ExpedientTaskModalPageNavParamsTask {
|
||||
taskStartDate: string
|
||||
isEvent: boolean
|
||||
workflowInstanceDataFields: {
|
||||
FsId: any,
|
||||
FolderID: any,
|
||||
DocId: any,
|
||||
DocID?: any
|
||||
FolderID: any, // folder
|
||||
Subject: string,
|
||||
DispatchNumber?: any
|
||||
DispatchNumber?: any,
|
||||
SourceSecFsID: any, // aplication id
|
||||
SourceType: 'DOC' | 'FOLDER',
|
||||
SourceID: any // doc id
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ export class fullTask {
|
||||
workflowID: number;
|
||||
totalDocuments: any;
|
||||
workflowInstanceDataFields: {
|
||||
DispatchNumber: any,
|
||||
AttachmentsProcessLastInstanceId: number,
|
||||
Sender: string,
|
||||
ViewerRequest: string,
|
||||
@@ -66,9 +67,19 @@ export class fullTask {
|
||||
workflowName: string
|
||||
}
|
||||
|
||||
export class tasksList extends fullTask{}
|
||||
export class customFullTask {
|
||||
serialNumber: string;
|
||||
taskStartDate: string;
|
||||
isEvent: true;
|
||||
workflowInstanceDataFields: {
|
||||
FsId: string,
|
||||
FolderID: number,
|
||||
DocId: number,
|
||||
Subject: string
|
||||
}
|
||||
}
|
||||
|
||||
export class customTaskList {
|
||||
export class customTask {
|
||||
SerialNumber: string
|
||||
Folio : string
|
||||
Senders: string
|
||||
@@ -83,4 +94,23 @@ export class customTaskList {
|
||||
Status : string
|
||||
}
|
||||
|
||||
export class customTask extends customTaskList{}
|
||||
|
||||
|
||||
|
||||
export interface expedienteTask {
|
||||
SerialNumber: string
|
||||
Folio : string
|
||||
Senders: string
|
||||
CreateDate : string
|
||||
DocumentURL : string
|
||||
Note: any
|
||||
FolderId : number | string
|
||||
Remetente : string
|
||||
DocId : number
|
||||
FsId: any
|
||||
WorkflowName : string
|
||||
Status : string
|
||||
DispatchNumber: any
|
||||
AttachmentsProcessLastInstanceID: any
|
||||
InstanceID: any
|
||||
}
|
||||
+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;
|
||||
}
|
||||
|
||||
// ================================================================================
|
||||
@@ -9,7 +9,6 @@ export class SearchDocument {
|
||||
appName?: string;
|
||||
}
|
||||
|
||||
|
||||
export class Attachments {
|
||||
Id?: number
|
||||
Source: number
|
||||
@@ -18,6 +17,7 @@ export class Attachments {
|
||||
ApplicationId: number | string
|
||||
}
|
||||
|
||||
// details
|
||||
export class FromSearchDocument {
|
||||
ApplicationId: number
|
||||
ApplicationID: number
|
||||
@@ -28,7 +28,7 @@ export class FromSearchDocument {
|
||||
SenderId: number
|
||||
}
|
||||
|
||||
|
||||
// details
|
||||
export class SearchFolder {
|
||||
ApplicationID: number
|
||||
ApplicationId: number
|
||||
@@ -51,5 +51,4 @@ export class SearchFolder {
|
||||
SenderId: null | string
|
||||
Status: string
|
||||
folderId: number
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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';
|
||||
@@ -9,8 +8,6 @@ import { Event } from '../../../models/event.model';
|
||||
import { EditEventPage } from '../edit-event/edit-event.page';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ExpedientTaskModalPage } from '../../gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { BookMeetingModalPage } from '../../gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
@@ -208,9 +205,6 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
async editEventDetail() {
|
||||
|
||||
console.log(this.caller);
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EditEventPage,
|
||||
componentProps: {
|
||||
|
||||
@@ -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';
|
||||
@@ -30,6 +31,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
el:any;
|
||||
members:any;
|
||||
|
||||
connection = connection
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
@@ -199,7 +201,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
//this.loadMessages()
|
||||
await this.serverLongPull();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ 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 { DailyWorkTask } from '../../../../models/dailyworktask.model';
|
||||
import { DailyWorkTask, fullTask } from '../../../../models/dailyworktask.model';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
|
||||
import { Event } from '../../../../models/event.model';
|
||||
@@ -36,7 +36,7 @@ export class DespachoPrPage implements OnInit {
|
||||
attachments:any;
|
||||
fulltask: any;
|
||||
eventsList: Event[];
|
||||
serialnumber: string;
|
||||
serialNumber: string;
|
||||
caller: string;
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
@@ -57,28 +57,30 @@ export class DespachoPrPage implements OnInit {
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
this.serialNumber = params["params"].SerialNumber;
|
||||
}
|
||||
if(params["params"].caller) {
|
||||
this.caller = params["params"].caller;
|
||||
}
|
||||
});
|
||||
|
||||
console.log('DespachoPrPage SerialNumber', this.serialNumber)
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.serialnumber);
|
||||
console.log(this.serialNumber);
|
||||
|
||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
||||
if (!paramMap.has('SerialNumber')) {
|
||||
return;
|
||||
}
|
||||
/* this.serialnumber = paramMap.get('SerialNumber'); */
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
// this.LoadRelatedEvents(this.serialnumber);
|
||||
/* this.serialNumber = paramMap.get('SerialNumber'); */
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
// this.LoadRelatedEvents(this.serialNumber);
|
||||
});
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
// this.LoadRelatedEvents(this.serialnumber);
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
// this.LoadRelatedEvents(this.serialNumber);
|
||||
}
|
||||
|
||||
close() {
|
||||
@@ -91,7 +93,7 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
|
||||
async LoadTaskDetail(serial: string) {
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
this.processes.GetTask(serial).subscribe((res:fullTask) => {
|
||||
this.task = {
|
||||
"SerialNumber": res.serialNumber,
|
||||
"Folio": res.workflowInstanceDataFields.Subject,
|
||||
@@ -179,7 +181,7 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
async executado(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -205,7 +207,7 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
async arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
@@ -232,7 +234,7 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
async generateDiploma(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
@@ -258,7 +260,7 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
async concluir(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Executado",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -285,7 +287,7 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reexecutar",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
@@ -314,7 +316,7 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
this.goBack();
|
||||
this.toastService.successMessage('Processo enviado para pendentes')
|
||||
},()=>{
|
||||
|
||||
@@ -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;
|
||||
@@ -190,53 +190,8 @@ export class DespachosPrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
// old
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
// this.distartExpedientModal();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
async openBookMeetingModal(task: customFullTask) {
|
||||
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
|
||||
@@ -253,7 +208,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 +226,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,8 @@ 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';
|
||||
import { Attachment, AttachmentList } from 'src/app/models/Excludetask';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho',
|
||||
@@ -191,7 +191,7 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any) {
|
||||
async arquivar(note:string, documents: AttachmentList) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
|
||||
@@ -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
-1
@@ -159,7 +159,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList": [],
|
||||
"AttachmentList": {},
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -8,8 +8,6 @@ import { momentG } from 'src/plugin/momentG';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
+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;
|
||||
}
|
||||
|
||||
+9
-14
@@ -125,26 +125,19 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
Nad: 30,
|
||||
Subject: '',
|
||||
Message: '',
|
||||
SourceSecFsId: this.task.workflowInstanceDataFields.FsId, //361
|
||||
SourceType: 'DOC', //FOLDER
|
||||
SourceId: this.task.workflowInstanceDataFields.DocID, //FolderId
|
||||
SourceSecFsId: this.task.workflowInstanceDataFields.SourceSecFsID, //361
|
||||
SourceType: this.task.workflowInstanceDataFields.SourceType, //FOLDER
|
||||
SourceId: this.task.workflowInstanceDataFields.SourceID, //FolderId
|
||||
DeadlineType: '',
|
||||
SubjectTypes: this.selectedTypes,
|
||||
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
|
||||
|
||||
};
|
||||
|
||||
console.log('task 123123', this.task)
|
||||
console.log('this.aplicationId', this.aplicationId)
|
||||
|
||||
if(this.aplicationId == 361) {
|
||||
this.dispatchFolder.SourceType = 'FOLDER'
|
||||
this.dispatchFolder.SourceId = this.task.workflowInstanceDataFields.FolderID
|
||||
} else if(this.aplicationId == 8) {
|
||||
this.dispatchFolder.SourceType = 'DOC'
|
||||
this.dispatchFolder.SourceId = this.task.workflowInstanceDataFields.DocId
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
@@ -152,6 +145,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
/* Initialize 'Subject' with the title of the expedient */
|
||||
this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject;
|
||||
this.profile = this.navParams.get('profile');
|
||||
|
||||
console.log(this.postData);
|
||||
}
|
||||
|
||||
async setAdding(type: "intervenient" | "CC") {
|
||||
@@ -159,7 +154,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.postData);
|
||||
|
||||
|
||||
this.taskDate = new Date(this.task.taskStartDate);
|
||||
if(!this.task.hasOwnProperty('isEvent')) {
|
||||
|
||||
+3
-1
@@ -20,6 +20,7 @@ import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
|
||||
import { ExpedientesService } from 'src/app/Rules/expedientes.service';
|
||||
import { expedienteTask } from 'src/app/models/dailyworktask.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-detail',
|
||||
@@ -33,7 +34,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
customDate:any;
|
||||
|
||||
task: any;
|
||||
task: expedienteTask;
|
||||
fulltask: any;
|
||||
eventsList: Event[];
|
||||
serialNumber: string;
|
||||
@@ -256,6 +257,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
"AttachmentsProcessLastInstanceID": res.workflowInstanceDataFields.AttachmentsProcessLastInstanceID,
|
||||
"InstanceID": res.workflowInstanceDataFields.InstanceID
|
||||
}
|
||||
|
||||
this.fulltask = res;
|
||||
|
||||
let thedate = new Date(this.task.CreateDate);
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { 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 { ToastService } from 'src/app/services/toast.service';
|
||||
import { ExpedienteStorage } from 'src/app/store/expediente-storage-service.service';
|
||||
|
||||
@@ -26,8 +24,6 @@ export class ExpedientePage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
private toastService: ToastService
|
||||
) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { Location } from '@angular/common';
|
||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-pr',
|
||||
@@ -340,14 +341,14 @@ export class ExpedientePrPage implements OnInit {
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
const DocumentToSave = res.data.documents.map((e:SearchDocument) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
let docs: AttachmentList = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
@@ -535,6 +536,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: OptsExpedientePrPage,
|
||||
cssClass: 'exp-options',
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
@@ -10,9 +10,6 @@ import WordCloud from 'src/plugin/wordcloud2.js';
|
||||
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
||||
import { PublicationDetailPage } from '../publications/view-publications/publication-detail/publication-detail.page';
|
||||
import { DocumentDetailPage } from 'src/app/modals/document-detail/document-detail.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-search',
|
||||
@@ -626,30 +623,34 @@ export class SearchPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(doc: any) {
|
||||
// async openExpedientActionsModal(doc: SearchDocument) {
|
||||
|
||||
let customTask = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
// let customTask: task = {
|
||||
// serialNumber: doc.SourceId,
|
||||
// taskStartDate: doc.CreateDate,
|
||||
// isEvent: true,
|
||||
// workflowInstanceDataFields: {
|
||||
// FolderID: ,
|
||||
// Subject: ,
|
||||
// SourceSecFsID: ,
|
||||
// SourceType: ,
|
||||
// SourceID: ,
|
||||
// FolderID: null,
|
||||
// DocId: doc.SourceId,
|
||||
// Subject: doc.SourceName,
|
||||
// },
|
||||
// }
|
||||
|
||||
const popover = await this.modalController.create({
|
||||
component: OptsExpedientePage,
|
||||
cssClass: 'model aside-modal search-submodal',
|
||||
componentProps: {
|
||||
fulltask: customTask,
|
||||
task: customTask
|
||||
},
|
||||
//translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
// const popover = await this.modalController.create({
|
||||
// component: OptsExpedientePage,
|
||||
// cssClass: 'model aside-modal search-submodal',
|
||||
// componentProps: {
|
||||
// fulltask: customTask,
|
||||
// task: customTask
|
||||
// },
|
||||
// //translucent: true
|
||||
// });
|
||||
// return await popover.present();
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from '../models/ExpedientTaskModalPage';
|
||||
import { Attachments, FromSearchDocument, SearchDocument, SearchFolder } from '../models/search-document';
|
||||
import { Attachments, SearchDocument } from '../models/search-document';
|
||||
|
||||
@Pipe({
|
||||
name: 'searchDocument'
|
||||
|
||||
@@ -11,6 +11,7 @@ import { AlertController } from '@ionic/angular';
|
||||
import { LocalstoreService } from '../store/localstore.service';
|
||||
import { ToastService } from './toast.service';
|
||||
import { UserStore } from 'src/app/store/user.service'
|
||||
import { SHA1, SHA256, AES, enc } from 'crypto-js'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -48,18 +49,16 @@ export class AuthService {
|
||||
|
||||
|
||||
async login(user: UserForm): Promise<boolean> {
|
||||
//user.BasicAuthKey = 'Basic ' + btoa(user.username + '@' + user.domainName + ':' + user.password);
|
||||
// user.BasicAuthKey = 'Basic ' + btoa(user.username + '@' + user.domainName + ':' + user.password);
|
||||
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + user.password); //conversão em base64 das credenciais inseridas
|
||||
console.log('Basic ' + btoa(user.username + ':' + SHA1(user.password).toString())); //conversão em base64 das credenciais inseridas
|
||||
|
||||
|
||||
const options = { headers: {'Authorization': user.BasicAuthKey }};
|
||||
this.headers = this.headers.set('Authorization',user.BasicAuthKey);
|
||||
this.opts = {
|
||||
headers: this.headers,
|
||||
}
|
||||
const service = environment.apiURL + "userauthentication/GetValidateAuth";
|
||||
|
||||
let result: boolean | PromiseLike<boolean> = false;
|
||||
let response: any;
|
||||
|
||||
try {
|
||||
@@ -76,7 +75,7 @@ export class AuthService {
|
||||
response.BasicAuthKey = user.BasicAuthKey
|
||||
this.ValidatedUser = response;
|
||||
|
||||
console.log('response', response)
|
||||
// console.log('response', response)
|
||||
|
||||
this.localstoreService.set('user', response)
|
||||
this.userStore.reset(response)
|
||||
|
||||
@@ -195,7 +195,7 @@ export class NotificationsService {
|
||||
var notificationReceived = (message) => {
|
||||
//this.jsonstore.createCollection('Notifications',message);
|
||||
this.DataArray.push(message)
|
||||
console.log("On ReceiveNotification", message)
|
||||
console.log("On ReceiveNotification", this.DataArray)
|
||||
this.storageService.store("Notifications",JSON.stringify(this.DataArray))
|
||||
|
||||
console.log(message);
|
||||
|
||||
@@ -175,7 +175,7 @@ export class ProcessesService {
|
||||
return this.http.post<any>(`${geturl}`, body, options)
|
||||
}
|
||||
|
||||
UpdateTaskStatus(FolderId:string): Observable<any>{
|
||||
UpdateTaskStatus(FolderId:any): Observable<any>{
|
||||
const geturl = environment.apiURL + 'Tasks/UpdateTaskStatus';
|
||||
let params = new HttpParams();
|
||||
|
||||
|
||||
@@ -23,10 +23,24 @@ export class SynchroService {
|
||||
private id: string = uuidv4();
|
||||
public conected = false
|
||||
private url: string = ''
|
||||
callback = function(){}
|
||||
|
||||
constructor(){}
|
||||
|
||||
setUrl(wss:wss) {
|
||||
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}/`
|
||||
}
|
||||
|
||||
@@ -42,19 +56,27 @@ export class SynchroService {
|
||||
|
||||
private onopen = () =>{
|
||||
console.log('open ======================= welcome to socket server')
|
||||
// this.connection.send(JSON.stringify({user:'user1'}));
|
||||
|
||||
}
|
||||
|
||||
public $send = (object: any) => {
|
||||
let sendData = JSON.stringify(Object.assign({}, object));
|
||||
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)=>{
|
||||
private onclose=(event:any)=> {
|
||||
setTimeout(() => {
|
||||
if (event.wasClean) {
|
||||
console.log(`[close] Connection closed cleanly, code=${event.code} reason=${event.reason}`);
|
||||
@@ -72,3 +94,8 @@ export class SynchroService {
|
||||
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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { AlertController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AlertController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
@@ -7,8 +7,6 @@ import { EventsService } from 'src/app/services/events.service';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { OptsExpedientePage } from '../../popover/opts-expediente/opts-expediente.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import { AfterViewChecked, Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { Status } from 'src/app/models/chat/status.model';
|
||||
import { AnimationController, ModalController, PopoverController } from '@ionic/angular';
|
||||
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 { 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';
|
||||
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({
|
||||
@@ -34,6 +33,9 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
@Input() roomId:string;
|
||||
@Input() showMessages:string;
|
||||
|
||||
|
||||
connection = connection
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
@@ -80,7 +82,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
load(){
|
||||
load = ()=>{
|
||||
this.checktimeOut = true;
|
||||
this.serverLongPull();
|
||||
this.getChatMembers();
|
||||
@@ -104,7 +106,9 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
sendMessage(){
|
||||
sendMessage() {
|
||||
|
||||
this.connection.$send({})
|
||||
|
||||
let body = {
|
||||
"message":
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
</div>
|
||||
<div class="div-profile cursor-pointer" (click)="openProfile()">
|
||||
<div *ngIf="this.notificationLength > 0" class="icon-badge" >{{this.notificationLength}}</div>
|
||||
<ion-icon class="icon" src='assets/images/icons-profile.svg'></ion-icon>
|
||||
<ion-label class="profile-text">{{loggeduser.Profile}}</ion-label>
|
||||
</div>
|
||||
|
||||
@@ -39,6 +39,19 @@
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.icon-badge {
|
||||
background-color: red;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
width:20px;
|
||||
height:20px;
|
||||
border-radius: 35%;
|
||||
position: absolute; /* changed */
|
||||
top: 5px; /* changed */
|
||||
right: 27px; /* changed */
|
||||
}
|
||||
|
||||
.profile-text{
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
|
||||
@@ -6,6 +6,8 @@ import { ProfileComponent } from '../headers/header-no-search/profile/profile.pa
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { ProfilePage } from 'src/app/modals/profile/profile.page';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
import { NotificationsService } from '../../services/notifications.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
@@ -15,29 +17,51 @@ import { ProfilePage } from 'src/app/modals/profile/profile.page';
|
||||
export class HeaderPage implements OnInit {
|
||||
|
||||
searchSubject: string = '';
|
||||
showSearch=false;
|
||||
showSearch = false;
|
||||
loggeduser: User;
|
||||
hideSearchBtn:boolean = false;
|
||||
hideSearchBtn: boolean = false;
|
||||
notificationdata: any[] = [];
|
||||
DataArray: Array<object> = [];
|
||||
notificationLength: 0;
|
||||
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private animationController: AnimationController,
|
||||
private storageservice: StorageService,
|
||||
private notificatioservice: NotificationsService,
|
||||
authService: AuthService
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
router.events.subscribe((val) => {
|
||||
this.showSearch=false;
|
||||
//this.modalController.dismiss();
|
||||
});
|
||||
}
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
router.events.subscribe((val) => {
|
||||
this.showSearch = false;
|
||||
//this.modalController.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.hideSearch();
|
||||
this.notificationLengthData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
hideSearch(){
|
||||
if(this.router.url == '/home/events' || this.router.url == '/home/chat'){
|
||||
async notificationLengthData() {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
console.log("Init get store", value)
|
||||
|
||||
var data = JSON.parse(value);
|
||||
this.notificationLength = data.length;
|
||||
})
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 10000))
|
||||
await this.notificationLengthData()
|
||||
console.log('Timer badge count')
|
||||
}
|
||||
|
||||
hideSearch() {
|
||||
if (this.router.url == '/home/events' || this.router.url == '/home/chat') {
|
||||
this.hideSearchBtn = true;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +73,7 @@ export class HeaderPage implements OnInit {
|
||||
async openSearch() {
|
||||
|
||||
let classs, showSearchInput, type;
|
||||
if(window.innerWidth < 1366) {
|
||||
if (window.innerWidth < 1366) {
|
||||
classs = 'modal modal-width-100'
|
||||
showSearchInput = true
|
||||
} else {
|
||||
@@ -59,7 +83,7 @@ export class HeaderPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
if(window.location.pathname.startsWith('/home/agenda')) {
|
||||
if (window.location.pathname.startsWith('/home/agenda')) {
|
||||
type = "Agenda"
|
||||
} else if (window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
type = "AccoesPresidenciais & ArquivoDespachoElect"
|
||||
@@ -80,7 +104,7 @@ export class HeaderPage implements OnInit {
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
changeRoute(path){
|
||||
changeRoute(path) {
|
||||
this.router.navigateByUrl(path)
|
||||
}
|
||||
|
||||
@@ -122,28 +146,28 @@ export class HeaderPage implements OnInit {
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
async dynamicSearch(){
|
||||
async dynamicSearch() {
|
||||
window['dynamicSearch'](this.searchSubject)
|
||||
}
|
||||
|
||||
|
||||
async closeSearch(){
|
||||
async closeSearch() {
|
||||
this.modalController.dismiss()
|
||||
}
|
||||
|
||||
/**
|
||||
* @description set empty value to searchSubject
|
||||
*/
|
||||
clearSearchInput(){
|
||||
/**
|
||||
* @description set empty value to searchSubject
|
||||
*/
|
||||
clearSearchInput() {
|
||||
this.searchSubject = "";
|
||||
window['dynamicSearch'](this.searchSubject)
|
||||
}
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
async basicSearch() {
|
||||
window['searchTriger']()
|
||||
}
|
||||
}
|
||||
|
||||
profileLabel(text) {
|
||||
profileLabel(text) {
|
||||
if (text == 'MDGPR') {
|
||||
return 'MD'
|
||||
} else if (text == 'PR') {
|
||||
|
||||
@@ -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,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
|
||||
this.popoverController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
@@ -174,7 +179,8 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
showAttachmentBtn: true
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
@@ -220,7 +226,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 +253,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 +280,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": {
|
||||
|
||||
@@ -24,17 +24,15 @@
|
||||
</div>
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
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 { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ModalController, PopoverController } from '@ionic/angular';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
@@ -25,7 +21,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
task: any;
|
||||
fulltask: any;
|
||||
serialnumber: string;
|
||||
serialNumber: string;
|
||||
profile: string
|
||||
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
@@ -45,10 +41,17 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
this.serialNumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
}
|
||||
});
|
||||
|
||||
if(this.task.serialNumber) {
|
||||
this.serialNumber = this.task.serialNumber
|
||||
} else if(this.task.SerialNumber) {
|
||||
this.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close () {
|
||||
@@ -82,6 +85,8 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
this.distartExpedientModal();
|
||||
|
||||
} else {
|
||||
this.goBack()
|
||||
}
|
||||
|
||||
this.popoverController.dismiss('close')
|
||||
@@ -90,7 +95,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
},()=>{
|
||||
@@ -144,7 +149,8 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
modal.onDidDismiss()
|
||||
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
@@ -169,7 +175,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
async generateDiploma(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
@@ -202,7 +208,8 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
showAttachmentBtn: true
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
@@ -250,7 +257,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
async arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
@@ -276,7 +283,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
async executado(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -302,7 +309,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reexecutar",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
@@ -322,23 +329,14 @@ 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.router.navigate(['/home/gabinete-digital/despachos-pr'])
|
||||
}
|
||||
|
||||
cancle() {
|
||||
this.popoverController.dismiss()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
if(this.task.Status != 'Pending'){
|
||||
this.showEnviarPendentes = true;
|
||||
}
|
||||
|
||||
|
||||
console.log('OptsExpedientePrPage ---- ', this.task);
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -86,6 +90,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
showAttachmentBtn: false,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
@@ -271,7 +276,6 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
fulltask: this.fulltask,
|
||||
aplicationId: 361
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { customTask, expedienteTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
@@ -19,7 +20,8 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
styleUrls: ['./opts-expediente.page.scss'],
|
||||
})
|
||||
export class OptsExpedientePage implements OnInit {
|
||||
task:any;
|
||||
|
||||
task: expedienteTask
|
||||
fulltask: any;
|
||||
profile:string;
|
||||
caller:string;
|
||||
@@ -42,7 +44,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
|
||||
if(this.task.Status != 'Pending'){
|
||||
if(this.task.Status != 'Pending') {
|
||||
this.showEnviarPendentes = true;
|
||||
}
|
||||
}
|
||||
@@ -214,7 +216,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
|
||||
async sendToReview(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.task.serialnumber || this.task.SerialNumber,
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999877,
|
||||
"dataFields": {
|
||||
@@ -248,7 +250,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
|
||||
async approve(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.task.serialnumber || this.task.SerialNumber,
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 100000004 ,
|
||||
"dataFields": {
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Parecer'">
|
||||
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Parecer' || task.WorkflowName == 'Pedido de Parecer do Presidente' ">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'">
|
||||
<button (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -196,6 +196,7 @@ export class RequestOptionsPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
showAttachmentBtn: true,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-searched-document-options',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ChatMessageService } from './chat-message.service';
|
||||
|
||||
describe('ChatMessageService', () => {
|
||||
let service: ChatMessageService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ChatMessageService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { localstoreService } from './localstore.service'
|
||||
import { SHA1 } from 'crypto-js'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ChatMessageService {
|
||||
|
||||
private _message = []
|
||||
// local storage keyName
|
||||
private keyName: string;
|
||||
|
||||
constructor() {
|
||||
|
||||
this.keyName = (SHA1(this.constructor.name)).toString()
|
||||
|
||||
setTimeout(()=> {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._message = restore.message || {}
|
||||
}, 10)
|
||||
|
||||
}
|
||||
|
||||
getMessages(roomId) {
|
||||
return this._message[roomId] || []
|
||||
}
|
||||
|
||||
add(roomId, message) {
|
||||
this._message[roomId] = message
|
||||
|
||||
setTimeout(()=> {
|
||||
localstoreService.set(this.keyName, {
|
||||
message: this._message
|
||||
})
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export const ChatMessageStore = new ChatMessageService()
|
||||
@@ -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 || []
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ export class LocalstoreService {
|
||||
|
||||
export const localstoreService = new LocalstoreService()
|
||||
|
||||
// console.log( AES.encrypt( 'peter', 'v14-dba29fd8bdbf24ffe4840b0f778f70f6a163d424').toString())
|
||||
|
||||
// // Create WebSocket connection.
|
||||
// const socket = new WebSocket('ws://localhost:8080');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user