mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
fix actions and draft data object
This commit is contained in:
@@ -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)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
+6
-6
@@ -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+";"
|
||||
|
||||
@@ -70,7 +70,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
SessionStore = SessionStore
|
||||
expedienteTaskPipe = new ExpedienteTaskPipe();
|
||||
|
||||
|
||||
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
|
||||
@@ -86,7 +86,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
|
||||
hideSearchBtn: boolean = false;
|
||||
showSearch = true;
|
||||
searchSubject: string = '';
|
||||
@@ -160,21 +160,21 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
const ordinance = this.ordinance
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
|
||||
const AllProcess = this.TaskService.AllProcess.filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
|
||||
|
||||
if(ordinance == this.ordinance) {
|
||||
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
|
||||
.filter( task => this.TaskService.filter(task, this.filterName))
|
||||
}
|
||||
} else {
|
||||
const AllProcess = this.TaskService.AllProcess.filter( task => this.TaskService.filter(task, this.filterName))
|
||||
|
||||
|
||||
if(ordinance == this.ordinance) {
|
||||
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
|
||||
.filter( task => this.TaskService.filter(task, this.filterName))
|
||||
@@ -198,7 +198,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(async () => {
|
||||
await this.loadAllProcesses()
|
||||
this.TaskService.registerCallback({
|
||||
@@ -208,12 +208,12 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
})
|
||||
})();
|
||||
|
||||
|
||||
this.checkFilter();
|
||||
this.checkRoutes();
|
||||
this.dynamicSearch()
|
||||
|
||||
|
||||
|
||||
|
||||
const pathname = '/home/gabinete-digital'
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url.includes(pathname) && !event.url.includes('/home/gabinete-digital/')) {
|
||||
@@ -230,13 +230,13 @@ export class GabineteDigitalPage implements OnInit {
|
||||
// this.LoadCounts();
|
||||
this.checkFilter()
|
||||
}
|
||||
|
||||
|
||||
this.mobile()
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
@@ -247,11 +247,11 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
|
||||
this.changeTab()
|
||||
});
|
||||
|
||||
|
||||
} catch(error) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
} else {
|
||||
this.refresh = false
|
||||
}
|
||||
|
||||
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@@ -291,14 +291,14 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
// console.log('this.filterName', this.filterName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
goto(url) {
|
||||
this.router.navigate([url])
|
||||
}
|
||||
|
||||
|
||||
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -375,7 +373,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
checkRoutes() {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
|
||||
// console.log(this.router.url, this.router.url.includes('processes=true'))
|
||||
// alert('hello')s
|
||||
if (this.router.url.includes('processes=true')) {
|
||||
@@ -463,7 +461,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
|
||||
async loadAllProcesses() {
|
||||
|
||||
|
||||
// this.skeletonLoader = true
|
||||
await this.TaskService.LoadTask()
|
||||
this.dynamicSearch()
|
||||
@@ -472,14 +470,14 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
doRefreshAside() {
|
||||
|
||||
|
||||
try {
|
||||
window['gabinete-aside-refresh']()
|
||||
} catch(error) {}
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
this.loadAllProcesses();
|
||||
}, 1000)
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
@@ -494,7 +492,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
event?.target?.complete();
|
||||
} catch(error) {}
|
||||
} catch(error) {}
|
||||
|
||||
|
||||
}, 2000);
|
||||
}
|
||||
else {
|
||||
@@ -671,7 +669,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.segment = segment;
|
||||
|
||||
if (window.innerWidth < 701) {
|
||||
|
||||
|
||||
let navigationExtras: NavigationExtras = { queryParams: { "gerarDiplomas": true }}
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-gerar'], navigationExtras);
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ export class PedidoPage implements OnInit {
|
||||
this.loggeduser = SessionStore.user;
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
//
|
||||
//
|
||||
|
||||
if (params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
@@ -103,9 +103,9 @@ export class PedidoPage implements OnInit {
|
||||
this.processes.GetTask(this.serialnumber).subscribe(res => {
|
||||
|
||||
this.fulltask = res
|
||||
|
||||
|
||||
this.TaskService.loadPedidos();
|
||||
|
||||
|
||||
if (res.workflowDisplayName == 'Pedido de Parecer' || res.workflowDisplayName == 'Pedido de Parecer do Presidente') {
|
||||
|
||||
let date = new Date(res.taskStartDate);
|
||||
@@ -131,7 +131,7 @@ export class PedidoPage implements OnInit {
|
||||
"Status": res.workflowInstanceDataFields.Status,
|
||||
"Deadline": res.deadline,
|
||||
}
|
||||
|
||||
|
||||
// this.updateProcess(res);
|
||||
}
|
||||
else if (res.workflowDisplayName == 'Pedido de Deferimento') {
|
||||
@@ -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)
|
||||
}
|
||||
@@ -164,7 +165,7 @@ export class PedidoPage implements OnInit {
|
||||
this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
|
||||
|
||||
this.processes.GetTaskParticipants(res.workflowInstanceDataFields.FolderID).subscribe((users = []) => {
|
||||
|
||||
|
||||
// this.updateProcessInterveners(users)
|
||||
this.intervenientes = users.filter(user => {
|
||||
return user.Type == 'I';
|
||||
@@ -214,7 +215,7 @@ export class PedidoPage implements OnInit {
|
||||
getDocumentDetails(forlderId: string, applicationId: string) {
|
||||
this.processes.GetDocumentDetails(forlderId, applicationId).subscribe(res => {
|
||||
this.attachments = res.Documents;
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -345,7 +346,7 @@ export class PedidoPage implements OnInit {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
@@ -385,7 +386,7 @@ export class PedidoPage implements OnInit {
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
|
||||
|
||||
this.goBack();
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
@@ -471,7 +472,7 @@ export class PedidoPage implements OnInit {
|
||||
// }
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
@@ -487,7 +488,7 @@ export class PedidoPage implements OnInit {
|
||||
modal.onDidDismiss().then(res => {
|
||||
if (res['data'] == 'close') {
|
||||
this.close();
|
||||
/*
|
||||
/*
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
@@ -500,7 +501,7 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
|
||||
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
@@ -516,7 +517,7 @@ export class PedidoPage implements OnInit {
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res){
|
||||
const data = res.data;
|
||||
@@ -554,12 +555,12 @@ export class PedidoPage implements OnInit {
|
||||
(error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openDarParecer(task: any) {
|
||||
|
||||
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth < 701) {
|
||||
|
||||
@@ -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,21 +400,14 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
if (this.publicationType == '3') {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
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,
|
||||
Files: this.seletedContent,
|
||||
}
|
||||
|
||||
|
||||
/* else {
|
||||
|
||||
if (this.seletedContent.length >= 1) {
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.publication = {
|
||||
DateIndex: this.publication.DateIndex,
|
||||
DocumentId: this.publication.DocumentId,
|
||||
@@ -423,79 +416,77 @@ export class NewPublicationPage implements OnInit {
|
||||
Message: this.pub.Message,
|
||||
DatePublication: this.publication.DatePublication,
|
||||
OriginalFileName: this.publication.OriginalFileName,
|
||||
FileBase64: this.publication.FileBase64,
|
||||
FileExtension: this.publication.FileExtension || 'jpeg',
|
||||
Files: this.seletedContent,
|
||||
}
|
||||
|
||||
} */
|
||||
|
||||
|
||||
try {
|
||||
|
||||
const response = await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
|
||||
this.httpErrorHandle.httpsSucessMessagge('Editar publicação')
|
||||
console.log({ response })
|
||||
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if (error.status == 404) {
|
||||
this.PublicationFolderService.deletePost(this.publication.ProcessId, this.publication.DocumentId)
|
||||
|
||||
|
||||
try {
|
||||
|
||||
const response = await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
|
||||
this.httpErrorHandle.httpsSucessMessagge('Editar publicação')
|
||||
console.log({ response })
|
||||
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if (error.status == 404) {
|
||||
this.PublicationFolderService.deletePost(this.publication.ProcessId, this.publication.DocumentId)
|
||||
this.close();
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
|
||||
|
||||
} else {
|
||||
this.toastService._badRequest("É necessário adicionar anexo")
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss')
|
||||
|
||||
/* if (this.capturedImage != '') { */
|
||||
this.publication = {
|
||||
DateIndex: date,
|
||||
DocumentId: null,
|
||||
ProcessId: this.folderId,
|
||||
Title: this.pub.Title,
|
||||
Message: this.pub.Message,
|
||||
DatePublication: date,
|
||||
OriginalFileName: this.capturedImageTitle,
|
||||
Files: this.seletedContent,
|
||||
/* FileExtension: 'jpeg', */
|
||||
}
|
||||
if (this.seletedContent.length >= 1) {
|
||||
|
||||
/* } 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 date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss')
|
||||
|
||||
/* if (this.capturedImage != '') { */
|
||||
this.publication = {
|
||||
DateIndex: date,
|
||||
DocumentId: null,
|
||||
ProcessId: this.folderId,
|
||||
Title: this.pub.Title,
|
||||
Message: this.pub.Message,
|
||||
DatePublication: date,
|
||||
OriginalFileName: this.capturedImageTitle,
|
||||
Files: this.seletedContent,
|
||||
/* FileExtension: 'jpeg', */
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
|
||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||
this.close();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
window["sharedContent"] = null;
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
|
||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||
this.close();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
window["sharedContent"] = null;
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
} else {
|
||||
this.toastService._badRequest("É necessário adicionar anexo")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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%;
|
||||
|
||||
Reference in New Issue
Block a user