mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
merge branch
This commit is contained in:
@@ -7,12 +7,12 @@
|
||||
float: left;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-family: Roboto;
|
||||
font-size: rem(25);
|
||||
padding: 0;
|
||||
color:#000;
|
||||
float: left;
|
||||
.header-title{
|
||||
font-family: Roboto;
|
||||
font-size: rem(25);
|
||||
padding: 0;
|
||||
color:#000;
|
||||
float: left;
|
||||
}
|
||||
/* .content{
|
||||
overflow: auto !important; */
|
||||
|
||||
@@ -588,6 +588,8 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
const selectedCalendarIds = this.getSelectedAgendaCalendars();
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
// this.calendar.currentDate.setDate(1);
|
||||
|
||||
this.updateEventListBox()
|
||||
|
||||
try {
|
||||
|
||||
@@ -26,11 +26,7 @@ export class EmendMessageModalPage implements OnInit {
|
||||
}
|
||||
|
||||
save() {
|
||||
if(this.emendMessage != '') {
|
||||
this.modalController.dismiss({option:'save', note: this.emendMessage});
|
||||
} else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
this.modalController.dismiss({option:'save', note: this.emendMessage});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,6 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
|
||||
if(res.data.option == 'save') {
|
||||
if(res.data.note !== '') {
|
||||
let body = { "serialNumber": this.serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
@@ -130,10 +129,6 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
@@ -129,8 +129,7 @@ export class EditEventPage implements OnInit {
|
||||
role: 'cancel',
|
||||
cssClass: 'secondary',
|
||||
handler: () => { }
|
||||
},
|
||||
{
|
||||
}, {
|
||||
text: 'Sim',
|
||||
handler: () => {
|
||||
this.Delete();
|
||||
|
||||
+24
-28
@@ -195,39 +195,35 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
if(res.data.option == 'save') {
|
||||
if(res.data.note !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
const loader = this.toastService.loading()
|
||||
//
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
|
||||
@@ -190,37 +190,34 @@ export class ApproveEventPage implements OnInit {
|
||||
.then(async (res) => {
|
||||
|
||||
if(res.data.option == 'save') {
|
||||
if (res.data !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
.catch(() => {
|
||||
|
||||
this.offlineManager.storeRequestData('event-listRever', body);
|
||||
});
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
.catch(() => {
|
||||
|
||||
this.offlineManager.storeRequestData('event-listRever', body);
|
||||
});
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
@@ -307,33 +304,30 @@ export class ApproveEventPage implements OnInit {
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
if(res.data.option == 'save') {
|
||||
if (res.data.note !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.goBack();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.goBack();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
@@ -194,8 +194,8 @@
|
||||
*ngIf="desktopComponent.showAddNewPublication"
|
||||
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||
[publicationType]="publicationType"
|
||||
[publication]="publication"
|
||||
[folderId]="folderId"
|
||||
[documentId]="documentId"
|
||||
|
||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||
(goBacktoPublicationDetails)="goBacktoPublicationDetails()"
|
||||
|
||||
@@ -48,6 +48,7 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
folderId: string;
|
||||
documentId: any
|
||||
// data set from child component
|
||||
publicationType: any;
|
||||
publicationId: string;
|
||||
@@ -386,6 +387,7 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
this.publication = publication;
|
||||
this.documentId = publication?.DocumentId
|
||||
this.desktopComponent.showAddNewPublication = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="post-img">
|
||||
<img [lazyLoad]="publication.FileBase64">
|
||||
</div>
|
||||
<div class="post-content px-20">
|
||||
<div class="post-content">
|
||||
<div class="post-title-time">
|
||||
<div class="post-title font-15-em">
|
||||
<ion-label>{{publication.Title}}</ion-label>
|
||||
|
||||
@@ -102,7 +102,7 @@ export class ChatSystemService {
|
||||
|
||||
|
||||
document.addEventListener('resume', function () {
|
||||
if(this._dm?.length == 0 || this._group?.length == 0) {
|
||||
if(this._dm?.length == 0 && this._group?.length == 0) {
|
||||
this.getAllRooms();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -851,12 +851,22 @@ export class EventsService {
|
||||
const puturl = environment.apiURL + 'calendar/PutEvent';
|
||||
let params = new HttpParams();
|
||||
|
||||
// event.Organizer = {
|
||||
// "Id": SessionStore.user.UserId,
|
||||
// "EmailAddress": SessionStore.user.Email,
|
||||
// "Name": SessionStore.user.UserName,
|
||||
// "IsRequired": true,
|
||||
// "UserType": "GD"
|
||||
// }
|
||||
// params = params.set("notifyUsers", true)
|
||||
|
||||
params = params.set("conflictResolutionMode", conflictResolutionMode.toString());
|
||||
params = params.set("sendInvitationsOrCancellationsMode", sendInvitationsOrCancellationsMode.toString());
|
||||
params.set('CalendarId', event.CalendarId)
|
||||
params.set('CalendarName', event.CalendarName)
|
||||
this.headers['CalendarId'] = event.CalendarId
|
||||
this.headers['CalendarName'] = event.CalendarName
|
||||
//params = params.set("CalendarName", event.CalendarName);
|
||||
|
||||
if (event.CalendarName == 'Oficial') {
|
||||
if (SessionStore.user.Profile == 'MDGPR') {
|
||||
|
||||
@@ -10,7 +10,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.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 { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -109,6 +109,7 @@ export class ApproveEventPage implements OnInit {
|
||||
async rejectTask(serialNumber:string) {
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Descartar" }
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -132,6 +133,8 @@ export class ApproveEventPage implements OnInit {
|
||||
} catch (error) {
|
||||
console.error('getAttchaments',error)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async viewDocument(DocId:string, Document) {
|
||||
@@ -193,33 +196,26 @@ export class ApproveEventPage implements OnInit {
|
||||
if(res.data.option == 'save') {
|
||||
|
||||
|
||||
if(res.data.note !== '') {
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(res.data.option == 'save') {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
<ion-content>
|
||||
<div class="content-container">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" placeholder="Título*" ></ion-input>
|
||||
@@ -29,6 +30,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div *ngIf="publication">
|
||||
OriginalFileName: {{ publication.OriginalFileName }}
|
||||
</div> -->
|
||||
|
||||
|
||||
<!-- Captured -->
|
||||
<div class="ion-item-container-no-border" *ngIf="capturedImage">
|
||||
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
|
||||
|
||||
@@ -32,6 +32,7 @@ export class NewPublicationPage implements OnInit {
|
||||
@Input() publication!: Publication;
|
||||
@Input() publicationType: string;
|
||||
@Input() folderId:string;
|
||||
@Input() documentId:string;
|
||||
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails = new EventEmitter<any>();
|
||||
@@ -64,16 +65,45 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
setData() {
|
||||
if(!this.publication) {
|
||||
if(!this.publicationType) {
|
||||
setTimeout(() => {
|
||||
this.setData()
|
||||
}, 500)
|
||||
} else {
|
||||
this.pub = this.publication
|
||||
// this.pub = this.publication
|
||||
// this.publication = null
|
||||
this.getPublicationDetail()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getPublicationDetail() {
|
||||
|
||||
if(this.publicationType != '2') {
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.documentId).subscribe( res => {
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
DocumentId: res.DocumentId,
|
||||
ProcessId:res.ProcessId,
|
||||
Title:res.Title,
|
||||
Message: res.Message,
|
||||
DatePublication: res.DatePublication,
|
||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||
OriginalFileName: res.OriginalFileName,
|
||||
FileExtension: res.FileExtension,
|
||||
}
|
||||
this.pub = this.publication;
|
||||
this.showLoader = false;
|
||||
}, () => {
|
||||
this.showLoader = false;
|
||||
this.goBack()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async takePicture() {
|
||||
const capturedImage = await Camera.getPhoto({
|
||||
quality: 50,
|
||||
@@ -130,6 +160,16 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
if(this.publicationType == '3') {
|
||||
|
||||
if(!this.publication?.OriginalFileName || !this.pub.OriginalFileName) {
|
||||
|
||||
if(this.pub?.OriginalFileName) {
|
||||
console.log('this.pub',this.pub)
|
||||
}
|
||||
throw('no this.publication.OriginalFileName')
|
||||
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
if(this.capturedImage != '') {
|
||||
|
||||
+1
@@ -10,6 +10,7 @@
|
||||
<p class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- OriginalFileName: {{ publication.OriginalFileName }} -->
|
||||
<div *ngIf="publication.Title == ''" class="title-contentd-flex pl-20 pt-25">
|
||||
<div class="back-icon cursor-pointer">
|
||||
<ion-icon (click)="goBack()" slot="end" src='assets/images/assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
|
||||
+3
@@ -70,10 +70,13 @@ export class PublicationDetailPage implements OnInit {
|
||||
const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId);
|
||||
|
||||
if(localPublication?.ProcessId) {
|
||||
console.log('console.log local storage')
|
||||
|
||||
this.publication = localPublication
|
||||
|
||||
} else {
|
||||
|
||||
console.log('API res')
|
||||
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res => {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="post-img">
|
||||
<img [lazyLoad]="publication.FileBase64">
|
||||
</div>
|
||||
<div class="post-content px-20">
|
||||
<div class="post-content">
|
||||
<div class="post-title-time">
|
||||
<div class="post-title">
|
||||
<ion-label>{{publication.Title}}</ion-label>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user