mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
merge
This commit is contained in:
@@ -34,6 +34,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
dateInput: "YYYY-MMMM-DD HH:mm"
|
||||
@@ -131,6 +132,8 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||
environment = environment
|
||||
eventPersons: EventPerson[];
|
||||
contacts: EventPerson[] = [];
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -142,7 +145,8 @@ export class NewEventPage implements OnInit {
|
||||
private chatMethodService: ChatMethodsService,
|
||||
private hhtpErrorHandle: HttpErrorHandle,
|
||||
private processeService: ProcessesService,
|
||||
public TaskService: TaskService
|
||||
public TaskService: TaskService,
|
||||
private contactsService: ContactsService,
|
||||
) {
|
||||
this.dateAdapter.setLocale('pt');
|
||||
this.loggeduser = SessionStore.user;
|
||||
@@ -220,6 +224,7 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log('Attendes',this.taskParticipants)
|
||||
this.taskParticipants = removeDuplicate(this.taskParticipants);
|
||||
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||
|
||||
@@ -234,6 +239,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
this.injectValidation();
|
||||
this.changeAgenda()
|
||||
this.fetchContacts("")
|
||||
|
||||
}
|
||||
|
||||
@@ -987,5 +993,34 @@ export class NewEventPage implements OnInit {
|
||||
return toAproveObject;
|
||||
}
|
||||
|
||||
async fetchContacts(filter: string) {
|
||||
|
||||
if (this.loggeduser.Profile == 'PR') {
|
||||
this.contactsService.getContacts(filter).subscribe(result => {
|
||||
if (this.eventPersons != null) {
|
||||
this.eventPersons.forEach(attendee => {
|
||||
const index: number = result.findIndex((cont) => {
|
||||
return cont.EmailAddress.toLocaleLowerCase() == attendee.EmailAddress.toLocaleLowerCase()
|
||||
});
|
||||
|
||||
result.splice(index, 1);
|
||||
|
||||
});
|
||||
}
|
||||
this.contacts = result;
|
||||
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)
|
||||
|
||||
this.contacts = filterLoggedUserEmail;
|
||||
|
||||
this.taskParticipants.push(this.contacts[0]);
|
||||
this.setIntervenient.emit(this.taskParticipants);
|
||||
console.log('Attendes Email', this.taskParticipants)
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -48,15 +48,14 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon font-45-em" src='assets/images/theme/gov/icons-profile.svg'></ion-icon> -->
|
||||
|
||||
<div *ngIf="profilePicture == ''" class="profile-image">
|
||||
<img *ngIf="loggeduser.RoleDescription == 'Presidente da República' " class="profile-image"
|
||||
<!-- <img *ngIf="loggeduser.RoleDescription == 'Presidente da República' " class="profile-image"
|
||||
src='assets/images/presidente.png'>
|
||||
<img *ngIf="loggeduser.RoleDescription == 'Ministro e Director do Gabinete do PR' " class="profile-image"
|
||||
src='assets/images/ministro.png'>
|
||||
<img *ngIf="loggeduser.RoleDescription == 'Secretário Geral' " class="profile-image"
|
||||
src='assets/images/secretaria_geral.png'>
|
||||
src='assets/images/secretaria_geral.png'> -->
|
||||
|
||||
<ion-icon
|
||||
*ngIf="loggeduser.RoleDescription != 'Presidente da República'&& loggeduser.RoleDescription != 'Ministro e Director do Gabinete do PR' && loggeduser.RoleDescription != 'Secretário Geral' "
|
||||
class="icon font-45-em" src='assets/images/theme/gov/icons-profile.svg'></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -212,15 +211,14 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src='assets/images/theme/gov/icons-profile.svg'></ion-icon> -->
|
||||
|
||||
<div *ngIf="profilePicture == ''" class="profile-image">
|
||||
<img *ngIf="loggeduser.RoleDescription == 'Presidente da República' " class="profile-image"
|
||||
<!-- <img *ngIf="loggeduser.RoleDescription == 'Presidente da República' " class="profile-image"
|
||||
src='assets/images/presidente.png'>
|
||||
<img *ngIf="loggeduser.RoleDescription == 'Ministro e Director do Gabinete do PR' " class="profile-image"
|
||||
src='assets/images/ministro.png'>
|
||||
<img *ngIf="loggeduser.RoleDescription == 'Secretário Geral' " class="profile-image"
|
||||
src='assets/images/secretaria_geral.png'>
|
||||
src='assets/images/secretaria_geral.png'> -->
|
||||
|
||||
<ion-icon
|
||||
*ngIf="loggeduser.RoleDescription != 'Presidente da República'&& loggeduser.RoleDescription != 'Ministro e Director do Gabinete do PR' && loggeduser.RoleDescription != 'Secretário Geral' "
|
||||
class="icon" src='assets/images/theme/gov/icons-profile.svg'></ion-icon>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -102,26 +102,29 @@ export class HeaderPage implements OnInit {
|
||||
|
||||
getProfilpicture() {
|
||||
|
||||
this.attachmentService.getUserProfilePhoto(this.SessionStore.user.UserPhoto).subscribe((base) => {
|
||||
if(this.SessionStore.user.UserPhoto) {
|
||||
this.attachmentService.getUserProfilePhoto(this.SessionStore.user.UserPhoto).subscribe((base) => {
|
||||
|
||||
this.storageService.store(this.SessionStore.user.RoleID.toString(), 'data:image/jpeg;base64,' + base).then((value) => {
|
||||
this.profilePicture = 'data:image/jpeg;base64,' + base;
|
||||
|
||||
console.log('picture saved', value)
|
||||
}).catch((error) => {
|
||||
console.log('picture not saved')
|
||||
});
|
||||
}, (error) => {
|
||||
console.log('profile picture errro: ', error)
|
||||
this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => {
|
||||
console.log(picture)
|
||||
this.profilePicture = picture
|
||||
}).catch((error) => {
|
||||
this.profilePicture = "";
|
||||
this.storageService.store(this.SessionStore.user.RoleID.toString(), 'data:image/jpeg;base64,' + base).then((value) => {
|
||||
this.profilePicture = 'data:image/jpeg;base64,' + base;
|
||||
|
||||
console.log('picture saved')
|
||||
}).catch((error) => {
|
||||
console.log('picture not saved')
|
||||
});
|
||||
}, (error) => {
|
||||
console.log('profile picture errro: ', error)
|
||||
this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => {
|
||||
/* console.log(picture) */
|
||||
this.profilePicture = picture
|
||||
}).catch((error) => {
|
||||
this.profilePicture = "";
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
} else {
|
||||
this.profilePicture = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ export class DiplomaOptionsPage implements OnInit {
|
||||
fulltask: any
|
||||
DraftIds = ""
|
||||
DraftNames = ""
|
||||
asDrat: boolean;
|
||||
asDraft: boolean;
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -48,7 +48,7 @@ export class DiplomaOptionsPage implements OnInit {
|
||||
|
||||
this.DraftIds = this.navParams.get("DraftIds");
|
||||
this.DraftNames = this.navParams.get("DraftNames");
|
||||
this.asDrat = this.navParams.get('asDrat');
|
||||
this.asDraft = this.navParams.get('asDraft');
|
||||
|
||||
|
||||
console.log('this.task', this.task)
|
||||
@@ -241,7 +241,7 @@ export class DiplomaOptionsPage implements OnInit {
|
||||
|
||||
async AssinarNew(note?, doc?) {
|
||||
|
||||
if (this.asDrat) {
|
||||
if (this.asDraft) {
|
||||
const modal = await this.modalController.create({
|
||||
component: PopupQuestionPage,
|
||||
componentProps: {
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<div *ngIf="content != ''" class="buttons header-fix">
|
||||
<!-- <button (click)="save(Document, content)" class="btn-cancel" shape="round" >Salvar</button> -->
|
||||
<button (click)="AssinarDraft()" class="btn-cancel" shape="round" >Assinar</button>
|
||||
<button *ngIf="p.userRole('PR')" (click)="AssinarDraft()" class="btn-cancel" shape="round" >Assinar</button>
|
||||
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
Reference in New Issue
Block a user