fix actions and draft data object

This commit is contained in:
Peter Maquiran
2024-01-17 10:25:16 +01:00
parent 69ee75b039
commit 4314ae1bff
35 changed files with 556 additions and 305 deletions
-17
View File
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="AngularRewrite" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
-6
View File
@@ -1,6 +0,0 @@
{
"server": {
"url": "http://192.168.1.3:8101",
"originalUrl": "http://192.168.1.3:8100"
}
}
+126 -3
View File
@@ -89,6 +89,7 @@
"@ionic/storage": "^2.3.1",
"@ionic/storage-angular": "^3.0.6",
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
"@microsoft/signalr": "^8.0.0",
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
"@ngx-translate/core": "^13.0.0",
"@ngxs/store": "^3.8.2",
@@ -7412,6 +7413,18 @@
"resolved": "https://registry.npmjs.org/@mattlewis92/dom-autoscroller/-/dom-autoscroller-2.4.2.tgz",
"integrity": "sha512-YbrUWREPGEjE/FU6foXcAT1YbVwqD/jkYnY1dFb0o4AxtP3s4xKBthlELjndZih8uwsDWgQZx1eNskRNe2BgZQ=="
},
"node_modules/@microsoft/signalr": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-8.0.0.tgz",
"integrity": "sha512-K/wS/VmzRWePCGqGh8MU8OWbS1Zvu7DG7LSJS62fBB8rJUXwwj4axQtqrAAwKGUZHQF6CuteuQR9xMsVpM2JNA==",
"dependencies": {
"abort-controller": "^3.0.0",
"eventsource": "^2.0.2",
"fetch-cookie": "^2.0.3",
"node-fetch": "^2.6.7",
"ws": "^7.4.5"
}
},
"node_modules/@netflix/nerror": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@netflix/nerror/-/nerror-1.1.3.tgz",
@@ -8596,6 +8609,17 @@
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"dependencies": {
"event-target-shim": "^5.0.0"
},
"engines": {
"node": ">=6.5"
}
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -15609,6 +15633,14 @@
"node": ">= 0.6"
}
},
"node_modules/event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/eventemitter-asyncresource": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz",
@@ -15638,7 +15670,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz",
"integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==",
"dev": true,
"engines": {
"node": ">=12.0.0"
}
@@ -16316,6 +16347,37 @@
"resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.1.tgz",
"integrity": "sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q=="
},
"node_modules/fetch-cookie": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-2.1.0.tgz",
"integrity": "sha512-39+cZRbWfbibmj22R2Jy6dmTbAWC+oqun1f1FzQaNurkPDUP4C38jpeZbiXCR88RKRVDp8UcDrbFXkNhN+NjYg==",
"dependencies": {
"set-cookie-parser": "^2.4.8",
"tough-cookie": "^4.0.0"
}
},
"node_modules/fetch-cookie/node_modules/tough-cookie": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
"integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
"dependencies": {
"psl": "^1.1.33",
"punycode": "^2.1.1",
"universalify": "^0.2.0",
"url-parse": "^1.5.3"
},
"engines": {
"node": ">=6"
}
},
"node_modules/fetch-cookie/node_modules/universalify": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
"integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/fflate": {
"version": "0.3.11",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.3.11.tgz",
@@ -33907,6 +33969,11 @@
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
},
"node_modules/set-cookie-parser": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",
"integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ=="
},
"node_modules/set-immediate-shim": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
@@ -49104,6 +49171,18 @@
"resolved": "https://registry.npmjs.org/@mattlewis92/dom-autoscroller/-/dom-autoscroller-2.4.2.tgz",
"integrity": "sha512-YbrUWREPGEjE/FU6foXcAT1YbVwqD/jkYnY1dFb0o4AxtP3s4xKBthlELjndZih8uwsDWgQZx1eNskRNe2BgZQ=="
},
"@microsoft/signalr": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-8.0.0.tgz",
"integrity": "sha512-K/wS/VmzRWePCGqGh8MU8OWbS1Zvu7DG7LSJS62fBB8rJUXwwj4axQtqrAAwKGUZHQF6CuteuQR9xMsVpM2JNA==",
"requires": {
"abort-controller": "^3.0.0",
"eventsource": "^2.0.2",
"fetch-cookie": "^2.0.3",
"node-fetch": "^2.6.7",
"ws": "^7.4.5"
}
},
"@netflix/nerror": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@netflix/nerror/-/nerror-1.1.3.tgz",
@@ -50155,6 +50234,14 @@
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"requires": {
"event-target-shim": "^5.0.0"
}
},
"accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -55408,6 +55495,11 @@
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
},
"event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
},
"eventemitter-asyncresource": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz",
@@ -55433,8 +55525,7 @@
"eventsource": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz",
"integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==",
"dev": true
"integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA=="
},
"evp_bytestokey": {
"version": "1.0.3",
@@ -55981,6 +56072,33 @@
"resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.1.tgz",
"integrity": "sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q=="
},
"fetch-cookie": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-2.1.0.tgz",
"integrity": "sha512-39+cZRbWfbibmj22R2Jy6dmTbAWC+oqun1f1FzQaNurkPDUP4C38jpeZbiXCR88RKRVDp8UcDrbFXkNhN+NjYg==",
"requires": {
"set-cookie-parser": "^2.4.8",
"tough-cookie": "^4.0.0"
},
"dependencies": {
"tough-cookie": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
"integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
"requires": {
"psl": "^1.1.33",
"punycode": "^2.1.1",
"universalify": "^0.2.0",
"url-parse": "^1.5.3"
}
},
"universalify": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
"integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg=="
}
}
},
"fflate": {
"version": "0.3.11",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.3.11.tgz",
@@ -69576,6 +69694,11 @@
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
},
"set-cookie-parser": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",
"integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ=="
},
"set-immediate-shim": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
+1
View File
@@ -103,6 +103,7 @@
"@ionic/storage": "^2.3.1",
"@ionic/storage-angular": "^3.0.6",
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
"@microsoft/signalr": "^8.0.0",
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
"@ngx-translate/core": "^13.0.0",
"@ngxs/store": "^3.8.2",
+1 -1
View File
@@ -62,7 +62,7 @@ export class AddNotePage implements OnInit {
this.documents.push(data.selected);
}
}, (error) => {
console.log(error)
// console.log(error)
});
await modal.present();
@@ -108,7 +108,7 @@ export class CreateProcessPage implements OnInit {
this.fulltask = this.navParams.get('fulltask');
console.log('this.fulltask', this.fulltask)
// console.log('this.fulltask', this.fulltask)
// if(this.fulltask?.Documents) {
@@ -121,7 +121,7 @@ export class CreateProcessPage implements OnInit {
this.taskType = this.navParams.get('taskAction');
console.log('this.taskType ',this.taskType )
// console.log('this.taskType ',this.taskType )
this.postData = new Despacho();
this.participants = this.participants = new Array();
@@ -184,7 +184,7 @@ export class CreateProcessPage implements OnInit {
}
ngOnInit() {
console.log('crete process')
// console.log('crete process')
this.getSubjectType();
/* setTimeout(() => {
this.selectedTypes = ['99999850'];
@@ -209,7 +209,7 @@ export class CreateProcessPage implements OnInit {
getSubjectType() {
this.processes.GetSubjectType().subscribe(res => {
console.log('subjectTypes',res)
// console.log('subjectTypes',res)
this.subjectTypes = res;
});
}
@@ -326,7 +326,7 @@ export class CreateProcessPage implements OnInit {
} else {
if (this.loggeduser.Profile != 'PR') {
console.log('Despacho MD');
// console.log('Despacho MD');
switch (this.taskType) {
case '0': // Despacho
this.postData = {
+37
View File
@@ -12,6 +12,26 @@ import { SearchPage } from 'src/app/pages/search/search.page';
import { ThemeService } from 'src/app/services/theme.service'
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { TaskService } from 'src/app/services/task.service'
import { z } from "zod";
const Bodyschema = z.object({
SerialNumber: z.string(),
DispatchDocId: z.number(),
FolderID: z.any(),
Subject: z.string(),
Comment: z.string().optional(),
DelegatedUserEmail: z.string().email(),
UserId: z.any(),
DraftIds: z.string(),
})
const ProsSchema = z.object({
DraftIds: z.string(),
})
@Component({
selector: 'app-delegar',
@@ -64,6 +84,19 @@ export class DelegarPage implements OnInit {
/* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */
this.hideThisFeature = this.navParams.get('showAttachmentBtn');
const result = ProsSchema.safeParse(this.task);
if(!result.success) {
console.log(result)
console.log("result")
console.log(result["error"])
} else {
console.log(result.data)
}
}
ngOnInit() {
@@ -86,6 +119,7 @@ export class DelegarPage implements OnInit {
else if(this.taskParticipants.length > 1){
this.toastService._badRequest("Selecione apenas um destinatário");
}
else {
let body = {
"SerialNumber": this.task.SerialNumber,
@@ -94,8 +128,11 @@ export class DelegarPage implements OnInit {
"Subject": this.task.Folio,
"Comment": this.note,
"DelegatedUserEmail": this.taskParticipants[0].EmailAddress,
"DraftIds": this.task.DraftIds,
"UserId": this.taskParticipants[0].Id
}
const loader = this.toastService.loading()
this.processes.DelegateTask(body).subscribe(res=>{
@@ -545,15 +545,15 @@ export class DocumentSetUpMeetingPage implements OnInit {
});
}
this.contacts = result;
console.log('Attendes Email', this.loggeduser.Email)
//console.log('Attendes Email', this.loggeduser.Email)
let filterLoggedUserEmail = this.contacts.filter(item => item.RoleDescription == "Ministro e Director do Gabinete do PR")
console.log('Attendes Email', filterLoggedUserEmail)
//console.log('Attendes Email', filterLoggedUserEmail)
this.contacts = filterLoggedUserEmail;
const newAttendees: EventPerson[] = this.contacts;
this.setIntervenient(newAttendees);
console.log('Attendes Email', this.contacts)
//console.log('Attendes Email', this.contacts)
}
);
}
@@ -125,7 +125,7 @@ export class ViewDocumentPage implements OnInit {
}
async openBookMeetingModal() {
console.log('this.Document----------', this.Document)
//console.log('this.Document----------', this.Document)
let classs;
if( window.innerWidth < 701) {
classs = 'book-meeting-modal modal modal-desktop'
@@ -165,7 +165,7 @@ export class ViewDocumentPage implements OnInit {
}
// check passing
console.log('this.Document----------openExpedientActionsModal', this.Document)
//console.log('this.Document----------openExpedientActionsModal', this.Document)
const modal = await this.modalController.create({
component: ExpedientTaskModalPage,
componentProps: {
+1
View File
@@ -5,4 +5,5 @@ export class EventPerson{
UserType: string;
IsPR: boolean;
RoleDescription: string;
Id: string
}
+1 -1
View File
@@ -429,7 +429,7 @@ export class AgendaPage implements OnInit {
}, 300)
}, 10)
} catch (error) {
console.log(error)
// console.log(error)
}
}
@@ -659,7 +659,7 @@ export class NewEventPage implements OnInit {
} catch (error) {
}
console.log('selectedCalendar', selectedCalendar)
// console.log('selectedCalendar', selectedCalendar)
if (selectedCalendar) {
if (selectedCalendar.Role = 'Presidente da República') {
@@ -859,15 +859,15 @@ export class NewEventPage implements OnInit {
});
}
this.contacts = result;
console.log('Attendes Email', this.loggeduser.Email)
//console.log('Attendes Email', this.loggeduser.Email)
let filterLoggedUserEmail = this.contacts.filter(item => item.RoleDescription == "Ministro e Director do Gabinete do PR")
console.log('Attendes Email', filterLoggedUserEmail)
//console.log('Attendes Email', filterLoggedUserEmail)
this.contacts = filterLoggedUserEmail;
const newAttendees: EventPerson[] = this.contacts;
this.setIntervenient(newAttendees);
console.log('Attendes Email', this.contacts)
//console.log('Attendes Email', this.contacts)
}
);
}
+5 -5
View File
@@ -153,7 +153,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
ngOnInit() {
try {
console.log(this.router.url);
// console.log(this.router.url);
this.createDirectoryImage()
// this.chatService.refreshtoken();
this.ChatSystemService.getUserOfRoom(this.roomId).then((value) => {
@@ -661,7 +661,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
imageBase64 = picture
});
console.log(imageBase64)
//console.log(imageBase64)
const blob = this.dataURItoBlob(imageBase64)
const formData = new FormData();
@@ -790,15 +790,15 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
imageBase64 = picture
});
console.log(imageBase64)
//console.log(imageBase64)
const response = await fetch(imageBase64);
const blob = await response.blob();
const formData = new FormData();
console.log('add file', formData)
//console.log('add file', formData)
formData.append("blobFile", blob);
console.log('add file', formData)
//console.log('add file', formData)
this.ChatSystemService.getDmRoom(roomId).send({
file: {
@@ -112,7 +112,8 @@ export class DespachoPrPage implements OnInit {
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
"Deadline": res.deadline,
"activityInstanceName": res.activityInstanceName,
"TaskStartDate": res.taskStartDate
"TaskStartDate": res.taskStartDate,
"DraftIds": res.workflowInstanceDataFields?.DraftIds
}
this.fulltask = res;
let stringDraft = res.workflowInstanceDataFields.DraftIds;
@@ -629,17 +630,17 @@ export class DespachoPrPage implements OnInit {
this.processes.GetDraftByID(element).subscribe((resd) => {
let object = {
"ApplicationId": "",
"Assunto": resd.data.description,
"Assunto": resd.data.document.description,
"DocDate": "",
"DocId": resd.data.id,
"DocId": resd.data.document.id,
"DocNumber": "",
"FolderId": "",
"Sender": "",
"SourceDocId": "",
"content": resd.data.content,
"path": resd.data.path,
"ownerId": resd.data.ownerId,
"status": resd.data.status,
"content": resd.data.document.content,
"path": resd.data.document.path,
"ownerId": resd.data.document.ownerId,
"status": resd.data.document.status,
}
this.mergedArray.push(object)
console.log('List of draff', resd)
@@ -142,8 +142,11 @@ export class DespachoPage implements OnInit {
"activityInstanceName": res.activityInstanceName,
"Status": res.workflowInstanceDataFields.Status,
"Deadline": res.deadline,
"DraftIds": res.workflowInstanceDataFields?.DraftIds
}
// console.log({res})
// this.updateProcessOnDB(res);
this.fulltask = res;
@@ -205,17 +208,17 @@ export class DespachoPage implements OnInit {
this.processes.GetDraftByID(element).subscribe((resd) => {
let object = {
"ApplicationId": "",
"Assunto": resd.data.description,
"Assunto": resd.data.document.description,
"DocDate": "",
"DocId": resd.data.id,
"DocId": resd.data.document.id,
"DocNumber": "",
"FolderId": "",
"Sender": "",
"SourceDocId": "",
"content": resd.data.content,
"path": resd.data.path,
"ownerId": resd.data.ownerId,
"status": resd.data.status,
"content": resd.data.document.content,
"path": resd.data.document.path,
"ownerId": resd.data.document.ownerId,
"status": resd.data.document.status,
}
this.mergedArray.push(object)
// console.log('List of draff', resd)
@@ -481,17 +481,17 @@ export class DiplomaAssinarPage implements OnInit {
let object = {
"ApplicationId": "",
"Assunto": resd.data.description,
"Assunto": resd.data.document.description,
"DocDate": "",
"DocId": resd.data.id,
"DocId": resd.data.document.id,
"DocNumber": "",
"FolderId": "",
"Sender": "",
"SourceDocId": "",
"content": resd.data.content,
"path": resd.data.path,
"ownerId": resd.data.ownerId,
"status": resd.data.status,
"content": resd.data.document.content,
"path": resd.data.document.path,
"ownerId": resd.data.document.ownerId,
"status": resd.data.document.status,
};
this.draftArray.push(object);
this.mergedArray.push(object);
@@ -106,7 +106,8 @@ export class DiplomasGerarPage implements OnInit {
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
"activityInstanceName": res.activityInstanceName,
"Deadline": res.deadline,
"TaskStartDate": res.taskStartDate
"TaskStartDate": res.taskStartDate,
"DraftIds": res.workflowInstanceDataFields?.DraftIds
}
this.fulltask = res;
@@ -144,6 +144,8 @@ export class DiplomaPage implements OnInit {
let stringDraft = res.workflowInstanceDataFields.DraftIds;
let split_stringDraft = stringDraft?.split(";").filter(Boolean);
console.log({split_stringDraft})
this.mergedArray = []
try {
this.getDraft(split_stringDraft);
@@ -537,17 +539,17 @@ export class DiplomaPage implements OnInit {
let object = {
"ApplicationId": "",
"Assunto": resd.data.description,
"Assunto": resd.data.document.description,
"DocDate": "",
"DocId": resd.data.id,
"DocId": resd.data.document.id,
"DocNumber": "",
"FolderId": "",
"Sender": "",
"SourceDocId": "",
"content": resd.data.content,
"path": resd.data.path,
"ownerId": resd.data.ownerId,
"status": resd.data.status,
"content": resd.data.document.content,
"path": resd.data.document.path,
"ownerId": resd.data.document.ownerId,
"status": resd.data.document.status,
}
this.mergedArray.push(object)
this.DraftNames = this.DraftNames + resd.data.description+";"
@@ -349,7 +349,6 @@ export class GabineteDigitalPage implements OnInit {
}
hideRefreshButton() {
console.log(this.router.url)
if (window.innerWidth < 701) {
this.hideRefreshBtn = false;
this.hideInMobile = false;
@@ -363,7 +362,6 @@ export class GabineteDigitalPage implements OnInit {
}
mobile() {
console.log(this.router.url)
if (window.innerWidth < 701 && this.router.url.includes('filter=')) {
this.hideRefreshBtn = false;
this.hideInMobile = false;
@@ -156,6 +156,7 @@ export class PedidoPage implements OnInit {
"ProcessInstanceID": res.workflowInstanceDataFields.InstanceID,
"activityInstanceName": res.activityInstanceName,
"Status": res.workflowInstanceDataFields.Status,
"DraftIds": res.workflowInstanceDataFields?.DraftIds
}
// this.updateProcess(res)
}
@@ -32,7 +32,7 @@
<div class="d-flex justify-content-between">
<div class="d-flex">
<ion-thumbnail *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" (click)="deleteFromSeletedContent(i)" lot="start">
<div *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" lot="start">
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'" [(ngModel)]="capturedImage"
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.FileBase64"
@@ -43,7 +43,11 @@
<source type="video/mp4" [src]="'data:video/mp4;base64,' + seleted.FileBase64">
</video>
</ion-thumbnail>
<div class="text-center cursor-pointer" (click)="deleteFromSeletedContent(i)">
<ion-icon src="assets/images/theme/gov/icons-delete.svg" class="delete md hydrated"></ion-icon>
</div>
</div>
<!-- Display the blurred image and count if there are more images -->
<ion-thumbnail *ngIf="seletedContent.length > displayLimit" lot="start">
<ion-img [src]="'data:image/jpg;base64,' + seletedContent[displayLimit - 1].base64"
@@ -57,9 +61,6 @@
</ion-label>
</div>
<div class="font-25" (click)="clear()">
<ion-icon name="close"></ion-icon>
</div>
</div>
</div>
@@ -400,6 +400,12 @@ export class NewPublicationPage implements OnInit {
if (this.publicationType == '3') {
if (this.seletedContent.length >= 1) {
const loader = this.toastService.loading()
this.publication = {
@@ -414,22 +420,6 @@ export class NewPublicationPage implements OnInit {
}
/* else {
this.publication = {
DateIndex: this.publication.DateIndex,
DocumentId: this.publication.DocumentId,
ProcessId: this.publication.ProcessId,
Title: this.pub.Title,
Message: this.pub.Message,
DatePublication: this.publication.DatePublication,
OriginalFileName: this.publication.OriginalFileName,
FileBase64: this.publication.FileBase64,
FileExtension: this.publication.FileExtension || 'jpeg',
}
} */
try {
const response = await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
@@ -449,9 +439,19 @@ export class NewPublicationPage implements OnInit {
loader.remove()
}
} else {
this.toastService._badRequest("É necessário adicionar anexo")
}
}
else {
if (this.seletedContent.length >= 1) {
const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss')
/* if (this.capturedImage != '') { */
@@ -467,21 +467,6 @@ export class NewPublicationPage implements OnInit {
/* FileExtension: 'jpeg', */
}
/* } else if (this.capturedVideo != '') {
this.publication = {
DateIndex: date,
DocumentId: null,
ProcessId: this.folderId,
Title: this.pub.Title,
Message: this.pub.Message,
DatePublication: date,
OriginalFileName: this.capturedImageTitle || 'video',
Files: this.seletedContent,
FileExtension: 'mp4',
}
} */
const loader = this.toastService.loading()
try {
@@ -498,6 +483,12 @@ export class NewPublicationPage implements OnInit {
loader.remove()
}
} else {
this.toastService._badRequest("É necessário adicionar anexo")
}
}
this.PublicationFolderService.getPublicationsIds(this.folderId)
@@ -716,4 +707,3 @@ export class NewPublicationPage implements OnInit {
}
}
@@ -122,13 +122,10 @@ ion-toolbar {
.post-img {
width: 100%;
height: 100%;
max-height: 400px;
min-height: 350px;
min-width: 350px;
margin: 5px auto;
border-radius: 0px !important;
overflow: hidden;
background-color: white;
@@ -136,6 +133,10 @@ ion-toolbar {
justify-content: center;
align-items: center;
background: black;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
-ms-border-radius: 0px !important;
-o-border-radius: 0px !important;
}
.post-video {
width: 100%;
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { SocketConnectionMCRService } from './socket-connection-mcr.service';
describe('SocketConnectionMCRService', () => {
let service: SocketConnectionMCRService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(SocketConnectionMCRService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
@@ -0,0 +1,27 @@
import { Injectable } from '@angular/core';
import * as signalR from "@microsoft/signalr"
import { SessionStore } from '../store/session.service';
@Injectable({
providedIn: 'root'
})
export class SocketConnectionMCRService {
constructor() { }
connect() {
var connection = new signalR.HubConnectionBuilder()
.withUrl("https://gdcmapi-dev.dyndns.info/FileHub", {
accessTokenFactory: () => SessionStore.user.Authorization
}).configureLogging(signalR.LogLevel.Information)
.build()
connection.on("ReceiveMessage", (message) => {
console.log(message)
})
}
}
@@ -155,4 +155,28 @@ export class MiddlewareServiceService {
return this.http.post<IuploadFileLK>(`${geturl}`, formData, options)
}
// ===========================================================================
CMAPIFileContent({length, path, index, blobFile}) {
const headers = new HttpHeaders();
headers.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
//const geturl = environment.apiURL + 'Tasks/DelegateTask';
const geturl = environment.apiURL + 'ObjectServer/UploadFiles';
let options = {
headers: headers
};
const formData = new FormData();
formData.append("blobFile", blobFile);
formData.append("length", length);
formData.append("index", index.toString());
formData.append("path", path);
return this.http.post<IuploadFileLK>(`${geturl}`, formData, options)
}
}
@@ -1,8 +1,8 @@
import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { LoginUserRespose } from 'src/app/models/user.model';
import { ThemeService } from 'src/app/services/theme.service'
import { TaskService } from 'src/app/services/task.service'
import { ThemeService } from 'src/app/services/theme.service';
import { TaskService } from 'src/app/services/task.service';
@Component({
selector: 'app-all-processes',
@@ -40,40 +40,45 @@
<!-- Captured -->
<div class="ion-item-container-no-border" *ngIf="seletedContent.length > 0">
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
<div class="d-flex justify-content-between">
<div *ngIf="seletedContent.length > 0">
<ion-label class="attached-title pb-10">Anexos</ion-label>
<div>
<div class="d-flex">
<ion-thumbnail *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" (click)="deleteFromSeletedContent(i)" lot="start">
<div *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" lot="start" class="mr-10">
<div>
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
name="image" ngDefaultControl [src]="seleted.FileBase64"></ion-img>
name="image" ngDefaultControl [src]="seleted.FileBase64" style="width: 50px;"></ion-img>
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
preload="metadata" webkit-playsinline="webkit-playsinline">
<source type="video/mp4" [src]="seleted.FileBase64">
</video>
<div class="text-center cursor-pointer" (click)="deleteFromSeletedContent(i)">
<ion-icon src="assets/images/theme/gov/icons-delete.svg" class="delete md hydrated"></ion-icon>
</div>
</ion-thumbnail>
</div>
</div>
<!-- Display the blurred image and count if there are more images -->
<ion-thumbnail *ngIf="seletedContent.length > displayLimit" lot="start">
<div *ngIf="seletedContent.length > displayLimit" lot="start">
<ion-img [src]="'data:image/jpg;base64,' + seletedContent[displayLimit - 1].FileBase64"
style="filter: blur(5px);"></ion-img>
<p>mais {{ seletedContent.length - displayLimit }}</p>
</ion-thumbnail>
</div>
<ion-label class="pl-10">
<p>{{capturedImageTitle}}</p>
<p hidden>size</p>
</ion-label>
</div>
<button class="btn-no-color" (click)="clear()">
<!-- <button class="btn-no-color" (click)="clear()">
<ion-icon name="close"></ion-icon>
</button>
</button> -->
</div>
</div>
@@ -102,7 +107,7 @@
</div>
</div> -->
<div class="ion-item-container-no-border hide-desktop">
<div class="hide-desktop">
<ion-label (click)="loadVideo()">
<div class="attach-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photo.svg"></ion-icon>
@@ -115,7 +120,7 @@
</ion-label>
</div>
<div class="ion-item-container-no-border">
<div >
<ion-label (click)="loadVideo()" class="cursor-pointer">
<div class="attach-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photos.svg"></ion-icon>
File diff suppressed because one or more lines are too long
@@ -58,6 +58,10 @@
</div>
</swiper-slide>
<!-- <div *ngIf="publication?.Files?.length == 0">
12
</div>
-->
<!--
<div class="swiper-button-next"
@@ -195,6 +195,7 @@
.post-content{
margin: 0 auto;
margin-bottom: 35px;
min-width: 468px;
}
.post-title-time{
width: 100%;
@@ -204,7 +205,7 @@
width: 60%;
float: left;
font-size: rem(15);
color: var(--title-text-color);
color: #0d89d1;
}
.post-data{
width: 40%;
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { CMAPIService } from './cmapi.service';
describe('CMAPIService', () => {
let service: CMAPIService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(CMAPIService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
@@ -0,0 +1,26 @@
import { Injectable } from '@angular/core';
import { MiddlewareServiceService } from "src/app/shared/API/middleware/middleware-service.service";
import { ok, err } from 'neverthrow';
@Injectable({
providedIn: 'root'
})
export class CMAPIService {
constructor(public MiddlewareServiceService: MiddlewareServiceService) {
window["CMAPIService"] = this
}
async FileContent({length, path, index, blobFile}) {
try {
const result = await this.MiddlewareServiceService.CMAPIFileContent({length, path, index, blobFile}).toPromise();
return ok(result)
} catch (error) {
return err(error)
}
}
}