mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix bug
This commit is contained in:
@@ -0,0 +1,221 @@
|
||||
|
||||
# Endpoints Documentation
|
||||
|
||||
## 1. Get Actions
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
GET https://gdapi-dev.dyndns.info/jwt/api/presidentialActions
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
**Body:**
|
||||
None
|
||||
|
||||
---
|
||||
|
||||
## 2. Post Action
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
POST https://gdapi-dev.dyndns.info/jwt/api/presidentialActions
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
**Body:**
|
||||
```json
|
||||
{
|
||||
"ProcessId": null,
|
||||
"Description": "teste 345",
|
||||
"Detail": "teste",
|
||||
"DateBegin": "2024-07-19T13:30:00.730Z",
|
||||
"DateEnd": "2024-07-19T13:45:00.730Z",
|
||||
"ActionType": "Evento"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Put Action
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
PUT https://gdapi-dev.dyndns.info/jwt/api/presidentialActions
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
**Body:**
|
||||
```json
|
||||
{
|
||||
"ProcessId": 15412,
|
||||
"Description": "teste 345 45",
|
||||
"Detail": "teste",
|
||||
"DateBegin": "2024-07-19T14:30:00+01:00",
|
||||
"DateEnd": "2024-07-19T14:45:00+01:00",
|
||||
"ActionType": "Evento"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. Delete Action
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
DELETE https://gdapi-dev.dyndns.info/jwt/api/presidentialActions/{actionId}
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
**Body:**
|
||||
None
|
||||
|
||||
---
|
||||
|
||||
## 5. Get Folder Info
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
GET https://gdapi-dev.dyndns.info/jwt/api/presidentialActions/{actionId}
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
**Body:**
|
||||
None
|
||||
|
||||
---
|
||||
|
||||
## 6. Get Publications IDs
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
GET https://gdapi-dev.dyndns.info/jwt/api/presidentialActions/{actionId}/posts/ids
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
- `folderId`: The ID of the folder (e.g., `15388`)
|
||||
|
||||
**Body:**
|
||||
None
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 7. Get publication
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
GET https://gdapi-dev.dyndns.info/jwt/api/presidentialActions/v2/posts/{publicationId}
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
- `id`: The ID of the publication (e.g., `15388`)
|
||||
|
||||
**Body:**
|
||||
None
|
||||
|
||||
---
|
||||
|
||||
## 8. Post publication
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
POST https://gdapi-dev.dyndns.info/jwt/api/presidentialActions/{actionId}/v2/posts
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
|
||||
**Body:**
|
||||
```json
|
||||
{
|
||||
"DateIndex": "2024-07-19T15:07:09.348Z",
|
||||
"DatePublication": "2024-07-19T15:07:09.348Z",
|
||||
"DocumentId": null,
|
||||
"Files": [{
|
||||
"FileBase64": "data:image/jpeg;base64,.."
|
||||
}],
|
||||
"Message": "2024-07-19T14:45:00+01:00",
|
||||
"ProcessId": 15388,
|
||||
"Title": "554",
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 9. Put publication
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
PUT https://gdapi-dev.dyndns.info/jwt/api/presidentialActions/{publicationId}/posts
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
**Body:**
|
||||
```json
|
||||
{
|
||||
"DateIndex": "2024-07-19T15:07:09.348Z",
|
||||
"DatePublication": "2024-07-19T15:07:09.348Z",
|
||||
"DocumentId": 142663,
|
||||
"Files": [{
|
||||
"FileBase64": "data:image/jpeg;base64,.."
|
||||
}],
|
||||
"Message": "2024-07-19T14:45:00+01:00",
|
||||
"ProcessId": 15388,
|
||||
"Title": "554",
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
## 10. Delete publication
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
Delete https://gdapi-dev.dyndns.info/jwt/api/presidentialActions/{actionId}/posts/{publicationId}
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
**Body:**
|
||||
None
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 11. Post Chuck
|
||||
|
||||
**Endpoint:**
|
||||
```
|
||||
Post https://gdapi-dev.dyndns.info/jwt/api/ObjectServer/StreamFiles?path={path}
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
None
|
||||
|
||||
**Body:**
|
||||
```json
|
||||
{
|
||||
"base64": "889234598237495...",
|
||||
"index": 4,
|
||||
"length": 15,
|
||||
"path": "88d7c4f6-9e4b-47e3-ae93-8203384d14e5.mp4",
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
@@ -14,6 +14,9 @@
|
||||
},
|
||||
{
|
||||
"path": "../grayLog"
|
||||
},
|
||||
{
|
||||
"path": "../../../Downloads/nestjs-microservice-boilerplate-api-master"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
|
||||
@@ -671,6 +671,7 @@ export class DespachoPrPage implements OnInit {
|
||||
"path": resd.data.path,
|
||||
"ownerId": resd.data.ownerId,
|
||||
"status": resd.data.status,
|
||||
"draft": true
|
||||
}
|
||||
this.mergedArray.push(object)
|
||||
console.log('List of draff', resd)
|
||||
|
||||
@@ -231,6 +231,7 @@ export class DespachoPage implements OnInit {
|
||||
"path": resd.data.path,
|
||||
"ownerId": resd.data.ownerId,
|
||||
"status": resd.data.status,
|
||||
"draft": true
|
||||
}
|
||||
this.mergedArray.push(object)
|
||||
// console.log('List of draff', resd)
|
||||
|
||||
+1
@@ -504,6 +504,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
"path": resd.data.path,
|
||||
"ownerId": resd.data.ownerId,
|
||||
"status": resd.data.status,
|
||||
"draft": true
|
||||
};
|
||||
this.draftArray.push(object);
|
||||
this.mergedArray.push(object);
|
||||
|
||||
@@ -562,6 +562,7 @@ export class DiplomaPage implements OnInit {
|
||||
"path": resd.data.path,
|
||||
"ownerId": resd.data.ownerId,
|
||||
"status": resd.data.status,
|
||||
"draft": true
|
||||
}
|
||||
this.mergedArray.push(object)
|
||||
this.DraftNames = this.DraftNames + resd.data.description+";"
|
||||
|
||||
+22
-3
@@ -251,6 +251,8 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
|
||||
console.log('LoadTaskDetail')
|
||||
|
||||
this.TaskService.loadExpedientes();
|
||||
|
||||
console.log("res========", res)
|
||||
@@ -372,6 +374,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
if (res) {
|
||||
console.log('attachment to add ==', res)
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
let body
|
||||
@@ -395,7 +398,15 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
try {
|
||||
loader.remove()
|
||||
await this.attachmentsService.AddAttachment(body).toPromise()
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
console.log('attachment post')
|
||||
setTimeout(() => {
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}, 1000);
|
||||
|
||||
setTimeout(() => {
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}, 4000);
|
||||
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
if (error.status == 0) {
|
||||
@@ -594,9 +605,8 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
// mobile
|
||||
async openOptions(taskAction?: any) {
|
||||
|
||||
|
||||
if (window.innerWidth > 500) {
|
||||
|
||||
this.showOptions = true
|
||||
@@ -613,7 +623,16 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
return await popover.present().then(() => {
|
||||
this.TaskService.loadExpedientes()
|
||||
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
|
||||
setTimeout(()=> {
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}, 1000)
|
||||
|
||||
setTimeout(()=> {
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}, 4000)
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
@@ -6,7 +6,9 @@ import { DeviceService } from "src/app/services/device.service"
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HeaderSettingsService } from "src/app/services/header-settings.service"
|
||||
import { from, Subject } from 'rxjs';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
import { Result } from 'neverthrow';
|
||||
|
||||
@Component({
|
||||
selector: 'app-viewer-attachment',
|
||||
@@ -17,6 +19,9 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
|
||||
@Input() showAttachmentList = true;
|
||||
@Input() selectedIndex = 0;
|
||||
currentIndex = null;
|
||||
currentLickTime = new Date();
|
||||
|
||||
swiperModules = [IonicSlides];
|
||||
@Input() taskViewerAttachment: ViewerAttachment[];
|
||||
viewer: {[key: string]: HTMLDivElement} = {}
|
||||
@@ -27,19 +32,30 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
draft = false
|
||||
loading = false
|
||||
|
||||
private fetchDataSubject = new Subject<any>();
|
||||
|
||||
constructor(
|
||||
public middlewareRepositoryService: MiddlewareRepositoryService,
|
||||
public DeviceService: DeviceService,
|
||||
private processes: ProcessesService,
|
||||
private erroHandler: HttpErrorHandle,
|
||||
public p: PermissionService,
|
||||
private processService: ProcessesService,
|
||||
private HeaderSettingsService: HeaderSettingsService
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.validateParams()
|
||||
const selectFirst = this.taskViewerAttachment[0]
|
||||
|
||||
this.fetchDataSubject.pipe(
|
||||
switchMap((data: any) => from(this.middlewareRepositoryService.getViewerLink(data)))
|
||||
).subscribe({
|
||||
next: (linkRequest) => {
|
||||
this.renderViewer(linkRequest)
|
||||
|
||||
console.log({linkRequest})
|
||||
},
|
||||
error: (error) => console.error(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +72,6 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
|
||||
firstLoad = true
|
||||
async clickDocument(viewerAttachment: ViewerAttachment, i) {
|
||||
|
||||
this.draft = false
|
||||
let count = 0
|
||||
|
||||
@@ -68,55 +83,52 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
try {
|
||||
|
||||
this.selectedIndex = i;
|
||||
|
||||
this.iframeContainer.nativeElement.style.display = 'none'
|
||||
|
||||
const requestI = this.selectedIndex
|
||||
|
||||
const linkRequest = await this.middlewareRepositoryService.getViewerLink({
|
||||
this.fetchDataSubject.next({
|
||||
ApplicationId: viewerAttachment.ApplicationId,
|
||||
DocId: viewerAttachment.DocId
|
||||
})
|
||||
|
||||
if(linkRequest.isOk() && requestI == this.selectedIndex) {
|
||||
|
||||
// Optionally, you can add new content or recreate the iframe
|
||||
var newIframe = document.createElement('iframe');
|
||||
if(linkRequest.value.includes("http")) {
|
||||
newIframe.src = linkRequest.value;
|
||||
|
||||
newIframe.width = '100%'
|
||||
newIframe.height = '100%'
|
||||
this.iframeContainer.nativeElement.innerHTML = ""
|
||||
|
||||
this.iframeContainer.nativeElement.appendChild(newIframe)
|
||||
|
||||
} else {
|
||||
this.iframeContainer.nativeElement.innerHTML = "Sem documento"
|
||||
}
|
||||
|
||||
this.loading = false
|
||||
this.iframeContainer.nativeElement.style.display = 'flex'
|
||||
} else if (requestI != this.selectedIndex) {
|
||||
|
||||
} else {
|
||||
|
||||
this.loading = false
|
||||
this.iframeContainer.nativeElement.style.display = 'none'
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
setTimeout(async ()=> {
|
||||
this.currentIndex = i
|
||||
} catch (err) {
|
||||
setTimeout(()=> {
|
||||
this.clickDocument(viewerAttachment, i);
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
renderViewer(linkRequest: Result<string, any>) {
|
||||
if(linkRequest.isOk()) {
|
||||
|
||||
// Optionally, you can add new content or recreate the iframe
|
||||
var newIframe = document.createElement('iframe');
|
||||
if(linkRequest.value.includes("http")) {
|
||||
|
||||
newIframe.src = linkRequest.value;
|
||||
|
||||
newIframe.width = '100%'
|
||||
newIframe.height = '100%'
|
||||
this.iframeContainer.nativeElement.innerHTML = ""
|
||||
|
||||
this.iframeContainer.nativeElement.appendChild(newIframe)
|
||||
} else {
|
||||
this.iframeContainer.nativeElement.innerHTML = "Sem documento"
|
||||
}
|
||||
|
||||
this.loading = false
|
||||
this.iframeContainer.nativeElement.style.display = 'flex'
|
||||
} else {
|
||||
|
||||
this.loading = false
|
||||
this.iframeContainer.nativeElement.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
validateParams() {
|
||||
@@ -138,7 +150,10 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
this.draft = this.isSelectedAttachmentIsDraft(this.taskViewerAttachment[this.selectedIndex])
|
||||
|
||||
if(!this.draft) {
|
||||
this.clickDocument(task, this.selectedIndex)
|
||||
if(this.selectedIndex != this.currentIndex) {
|
||||
this.clickDocument(task, this.selectedIndex)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -228,10 +228,14 @@ export class TaskService {
|
||||
async loadDespachos() {
|
||||
this.showLoaderNum++
|
||||
|
||||
let despachos = await this.despachoRule.getList({ updateStore: true })
|
||||
if (despachos) {
|
||||
this.despachoStore.reset(despachos)
|
||||
}
|
||||
try {
|
||||
|
||||
let despachos = await this.despachoRule.getList({ updateStore: true })
|
||||
if (despachos) {
|
||||
this.despachoStore.reset(despachos)
|
||||
}
|
||||
|
||||
} catch(error) {}
|
||||
|
||||
this.showLoaderNum--
|
||||
}
|
||||
|
||||
@@ -109,9 +109,6 @@
|
||||
<button (click)="openBookMeetingModal(Document)" mat-menu-item>
|
||||
<span>Marcar Reunião</span>
|
||||
</button>
|
||||
<button *ngIf="p.userRole('PR')" mat-menu-item>
|
||||
<span>Assinar</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { expedienteTask } from 'src/app/models/dailyworktask.model';
|
||||
import { SearchList } from 'src/app/models/search-document';
|
||||
@@ -21,7 +20,6 @@ import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TaskService } from 'src/app/services/task.service';
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente',
|
||||
@@ -45,10 +43,8 @@ export class OptsExpedientePage implements OnInit {
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes: ProcessesService,
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
public p: PermissionService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private RouteService: RouteService,
|
||||
@@ -56,14 +52,9 @@ export class OptsExpedientePage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHanlde: HttpErrorHandle,
|
||||
public TaskService: TaskService,
|
||||
private dataService: DataService,
|
||||
) {
|
||||
) {}
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
ngOnInit() {}
|
||||
|
||||
async openNewGroupPage() {
|
||||
|
||||
@@ -107,6 +98,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
}
|
||||
|
||||
attachDocument(){
|
||||
// alert('click herer!!s')
|
||||
this.getDoc();
|
||||
}
|
||||
|
||||
@@ -122,7 +114,13 @@ export class OptsExpedientePage implements OnInit {
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( async (res)=>{
|
||||
|
||||
console.log({res});
|
||||
|
||||
if(res){
|
||||
|
||||
|
||||
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
this.documents.forEach((element: any) =>{
|
||||
@@ -141,7 +139,11 @@ export class OptsExpedientePage implements OnInit {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
// alert('done select attachment')
|
||||
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
|
||||
|
||||
// alert('@')
|
||||
window['attachments-expediente-update']();
|
||||
this.toastService._successMessage()
|
||||
this.popoverController.dismiss()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "357e76bb1",
|
||||
"SHA": "357e76bb164985fd8001f94210d5071ca24a3b1b",
|
||||
"shortSHA": "f80e49d53",
|
||||
"SHA": "f80e49d53340aff8e94ad36b4c44b1eae01cfb39",
|
||||
"branch": "feature/agenda-api-peter",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Thu Jul 18 10:30:29 2024 +0100'",
|
||||
"lastCommitMessage": "load calendars on open edit-event modal and new event modal.",
|
||||
"lastCommitNumber": "5874",
|
||||
"changeStatus": "On branch feature/agenda-api-peter\nYour branch is ahead of 'origin/feature/agenda-api-peter' by 1 commit.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: version/git-version.ts",
|
||||
"lastCommitTime": "'Thu Jul 18 10:40:33 2024 +0100'",
|
||||
"lastCommitMessage": "change build version",
|
||||
"lastCommitNumber": "5875",
|
||||
"changeStatus": "On branch feature/agenda-api-peter\nYour branch is ahead of 'origin/feature/agenda-api-peter' by 2 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tnew file: endpoints_documentation.md\n\tmodified: gabinete-digital-fo.code-workspace\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts\n\tmodified: src/app/pages/gabinete-digital/viewer-attachment/viewer-attachment.page.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/gabinete-digital/generic/task-details/task-details.page.html\n\tmodified: src/app/shared/popover/opts-expediente/opts-expediente.page.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user