mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
git pull made
This commit is contained in:
@@ -147,6 +147,11 @@ ion-list {
|
|||||||
.notification-icon {
|
.notification-icon {
|
||||||
font-size: rem(35) !important;
|
font-size: rem(35) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notification-icon-error {
|
||||||
|
width: 30px !important;
|
||||||
|
height: 30px !important;
|
||||||
|
}
|
||||||
.approve-event-time {
|
.approve-event-time {
|
||||||
width: fit-content !important;
|
width: fit-content !important;
|
||||||
float: left;
|
float: left;
|
||||||
@@ -161,6 +166,17 @@ ion-list {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.approve-event-detail-error {
|
||||||
|
width: calc(100% - 115px) !important;
|
||||||
|
float: left;
|
||||||
|
#profile-title-error {
|
||||||
|
width: 250px;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: small
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
.notification-label-MD-official {
|
.notification-label-MD-official {
|
||||||
float: right;
|
float: right;
|
||||||
width: 5px;
|
width: 5px;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export interface Attachment {
|
|||||||
export interface AttachmentList {
|
export interface AttachmentList {
|
||||||
ProcessInstanceID?: string;
|
ProcessInstanceID?: string;
|
||||||
Attachments?: Attachment[];
|
Attachments?: Attachment[];
|
||||||
|
DraftIds?: any
|
||||||
}
|
}
|
||||||
export interface Excludetask {
|
export interface Excludetask {
|
||||||
serialNumber: string;
|
serialNumber: string;
|
||||||
@@ -13,6 +14,8 @@ export interface Excludetask {
|
|||||||
dataFields: {
|
dataFields: {
|
||||||
ReviewUserComment?: string,
|
ReviewUserComment?: string,
|
||||||
Note?: any
|
Note?: any
|
||||||
|
InstanceIDNew?: any
|
||||||
|
DraftIds?: any
|
||||||
}
|
}
|
||||||
FolderId?: number;
|
FolderId?: number;
|
||||||
AttachmentList?: AttachmentList | any;
|
AttachmentList?: AttachmentList | any;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import { PermissionService } from 'src/app/services/permission.service';
|
|||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { RoleIdService } from 'src/app/services/role-id.service'
|
import { RoleIdService } from 'src/app/services/role-id.service'
|
||||||
import { EventListStore } from 'src/app/models/agenda/AgendaEventList';
|
import { EventListStore } from 'src/app/models/agenda/AgendaEventList';
|
||||||
|
import { ContactsService } from 'src/app/services/contacts.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-agenda',
|
selector: 'app-agenda',
|
||||||
@@ -180,7 +181,8 @@ export class AgendaPage implements OnInit {
|
|||||||
private backgroundservice: BackgroundService,
|
private backgroundservice: BackgroundService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
public p: PermissionService,
|
public p: PermissionService,
|
||||||
public RoleIdService: RoleIdService
|
public RoleIdService: RoleIdService,
|
||||||
|
private ContactsService: ContactsService
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.dateAdapter.setLocale('es');
|
this.dateAdapter.setLocale('es');
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
|||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { ContactsService } from 'src/app/services/contacts.service';
|
||||||
|
|
||||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
parse: {
|
parse: {
|
||||||
@@ -96,7 +97,8 @@ export class EditEventPage implements OnInit {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private httpErrorHandle: HttpErrorHandle
|
private httpErrorHandle: HttpErrorHandle,
|
||||||
|
private contactsService: ContactsService
|
||||||
) {
|
) {
|
||||||
|
|
||||||
/* this.postEvent = new Event(); */
|
/* this.postEvent = new Event(); */
|
||||||
@@ -108,6 +110,20 @@ export class EditEventPage implements OnInit {
|
|||||||
this.caller = this.navParams.get('caller');
|
this.caller = this.navParams.get('caller');
|
||||||
this.initCalendarName = this.postEvent.CalendarName;
|
this.initCalendarName = this.postEvent.CalendarName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for(const index in this.postEvent.Attendees) {
|
||||||
|
const user = this.postEvent.Attendees[index]
|
||||||
|
|
||||||
|
const userData = this.contactsService.constacts.find(e => user.EmailAddress == e.EmailAddress)
|
||||||
|
if(userData) {
|
||||||
|
this.postEvent.Attendees[index].UserType = userData.UserType
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(this.postEvent){
|
if(this.postEvent){
|
||||||
if( this.postEvent.Body){
|
if( this.postEvent.Body){
|
||||||
if(typeof(this.postEvent.Body.Text) == 'string'){
|
if(typeof(this.postEvent.Body.Text) == 'string'){
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ export class DiplomaPage implements OnInit {
|
|||||||
customDate: any;
|
customDate: any;
|
||||||
mergedArray: any = [];
|
mergedArray: any = [];
|
||||||
|
|
||||||
|
|
||||||
|
DraftNames = ""
|
||||||
|
DraftIds = ""
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
public popoverController: PopoverController,
|
public popoverController: PopoverController,
|
||||||
@@ -520,10 +524,13 @@ export class DiplomaPage implements OnInit {
|
|||||||
this.mergedArray.push(docObject);
|
this.mergedArray.push(docObject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getDraft(split_stringDraft: string[]) {
|
async getDraft(split_stringDraft: string[]) {
|
||||||
split_stringDraft.forEach(element => {
|
this.DraftNames = ""
|
||||||
console.log('List of ids', element)
|
|
||||||
this.processes.GetDraftByID(element).subscribe((resd) => {
|
for(const strg of split_stringDraft) {
|
||||||
|
console.log('List of ids', strg)
|
||||||
|
const resd = await this.processes.GetDraftByID(strg).toPromise()
|
||||||
|
|
||||||
let object = {
|
let object = {
|
||||||
"ApplicationId": "",
|
"ApplicationId": "",
|
||||||
"Assunto": resd.data.description,
|
"Assunto": resd.data.description,
|
||||||
@@ -539,10 +546,12 @@ export class DiplomaPage implements OnInit {
|
|||||||
"status": resd.data.status,
|
"status": resd.data.status,
|
||||||
}
|
}
|
||||||
this.mergedArray.push(object)
|
this.mergedArray.push(object)
|
||||||
|
this.DraftNames = this.DraftNames + resd.data.description+";"
|
||||||
console.log('List of draff', resd)
|
console.log('List of draff', resd)
|
||||||
})
|
}
|
||||||
|
|
||||||
});
|
this.DraftNames = this.DraftNames.slice(0, -1);
|
||||||
|
this.DraftIds = this.DraftIds.slice(0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ export class ContactsService {
|
|||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
headers: HttpHeaders;
|
headers: HttpHeaders;
|
||||||
|
|
||||||
|
constacts: EventPerson[] = []
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
user: AuthService,
|
user: AuthService,
|
||||||
@@ -26,6 +28,10 @@ export class ContactsService {
|
|||||||
this.changeProfileService.registerCallback(() => {
|
this.changeProfileService.registerCallback(() => {
|
||||||
this.setHeader()
|
this.setHeader()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.getContacts("").subscribe( result => {
|
||||||
|
this.constacts = result
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
setHeader() {
|
setHeader() {
|
||||||
|
|||||||
@@ -275,6 +275,8 @@ export class ProcessesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CompleteTask(body:Excludetask) {
|
CompleteTask(body:Excludetask) {
|
||||||
|
|
||||||
|
// double check
|
||||||
const geturl = environment.apiURL + 'Tasks/CompleteTask';
|
const geturl = environment.apiURL + 'Tasks/CompleteTask';
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
@@ -336,6 +338,23 @@ export class ProcessesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
postParecer(body:any) {
|
postParecer(body:any) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(!body.AttachmentList) {
|
||||||
|
body.AttachmentList = {}
|
||||||
|
}
|
||||||
|
if(!body?.dataFields) {
|
||||||
|
body.dataFields = {}
|
||||||
|
}
|
||||||
|
if(!body.dataFields?.DraftIds) {
|
||||||
|
body.dataFields.DraftIds = ""
|
||||||
|
}
|
||||||
|
if(!body.AttachmentList?.DraftIds) {
|
||||||
|
body.AttachmentList.DraftIds = ""
|
||||||
|
}
|
||||||
|
} catch (error) {}
|
||||||
|
|
||||||
|
|
||||||
const geturl = environment.apiURL + 'Processes/CreateParecer';
|
const geturl = environment.apiURL + 'Processes/CreateParecer';
|
||||||
let options = {
|
let options = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
@@ -344,6 +363,22 @@ export class ProcessesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
postParecerPr(body:any) {
|
postParecerPr(body:any) {
|
||||||
|
try {
|
||||||
|
if(!body.AttachmentList) {
|
||||||
|
body.AttachmentList = {}
|
||||||
|
}
|
||||||
|
if(!body?.dataFields) {
|
||||||
|
body.dataFields = {}
|
||||||
|
}
|
||||||
|
if(!body.dataFields?.DraftIds) {
|
||||||
|
body.dataFields.DraftIds = ""
|
||||||
|
}
|
||||||
|
if(!body.AttachmentList?.DraftIds) {
|
||||||
|
body.AttachmentList.DraftIds = ""
|
||||||
|
}
|
||||||
|
} catch(error) {}
|
||||||
|
|
||||||
|
|
||||||
const geturl = environment.apiURL + 'Processes/CreateParecerPR';
|
const geturl = environment.apiURL + 'Processes/CreateParecerPR';
|
||||||
let options = {
|
let options = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="_postEvent.Subject"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="Form && validateFrom" >
|
<div *ngIf="Form && validateFrom" >
|
||||||
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="_postEvent.Location"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Error messages -->
|
<!-- Error messages -->
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<div class="ion-input-class flex-grow-1">
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
|
||||||
<mat-form-field appearance="none" floatLabel="never" class="width-100 " >
|
<mat-form-field appearance="none" floatLabel="never" class="width-100 " >
|
||||||
<mat-select placeholder="Selecione agenda*" [(ngModel)]="postEvent.CalendarName" [disabled]=true>
|
<mat-select placeholder="Selecione agenda*" [(ngModel)]="_postEvent.CalendarName" [disabled]=true>
|
||||||
<mat-option *ngFor="let calendars of CalendarNamesOptions" value="{{calendars}}">
|
<mat-option *ngFor="let calendars of CalendarNamesOptions" value="{{calendars}}">
|
||||||
Agenda {{ calendars }}
|
Agenda {{ calendars }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
||||||
<!-- <input matInput type="text" > -->
|
<!-- <input matInput type="text" > -->
|
||||||
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Category" >
|
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="_postEvent.Category" >
|
||||||
<mat-option value="Reunião">
|
<mat-option value="Reunião">
|
||||||
Reunião
|
Reunião
|
||||||
</mat-option>
|
</mat-option>
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
<mat-form-field appearance="none" floatLabel="never" class="date-hour-picker">
|
<mat-form-field appearance="none" floatLabel="never" class="date-hour-picker">
|
||||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[(ngModel)]="postEvent.StartDate"
|
[(ngModel)]="_postEvent.StartDate"
|
||||||
[max]="maxDate"
|
[max]="maxDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
>
|
>
|
||||||
@@ -158,10 +158,10 @@
|
|||||||
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
|
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
|
||||||
<input matInput [ngxMatDatetimePicker]="fim"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[(ngModel)]="postEvent.EndDate"
|
[(ngModel)]="_postEvent.EndDate"
|
||||||
[max]="maxDate"
|
[max]="maxDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[min]="postEvent.StartDate"
|
[min]="_postEvent.StartDate"
|
||||||
>
|
>
|
||||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||||
<ngx-mat-datetime-picker #fim
|
<ngx-mat-datetime-picker #fim
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
|
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
|
||||||
<mat-select
|
<mat-select
|
||||||
placeholder="Selecione repetição*"
|
placeholder="Selecione repetição*"
|
||||||
[(ngModel)]="postEvent.EventRecurrence.Type"
|
[(ngModel)]="_postEvent.EventRecurrence.Type"
|
||||||
(ngModelChange)="onSelectedRecurringChanged($event)">
|
(ngModelChange)="onSelectedRecurringChanged($event)">
|
||||||
<mat-option
|
<mat-option
|
||||||
*ngFor="let recurring of recurringTypes"
|
*ngFor="let recurring of recurringTypes"
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div *ngIf="postEvent.EventRecurrence.Type != '-1'" class="container-div width-100">
|
<div *ngIf="_postEvent.EventRecurrence.Type != '-1'" class="container-div width-100">
|
||||||
<div class="ion-item-class-2 d-flex">
|
<div class="ion-item-class-2 d-flex">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
@@ -210,9 +210,9 @@
|
|||||||
<mat-form-field class="date-hour-picker">
|
<mat-form-field class="date-hour-picker">
|
||||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
[(ngModel)]="_postEvent.EventRecurrence.LastOccurrence"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[min]="postEvent.EndDate"
|
[min]="_postEvent.EndDate"
|
||||||
>
|
>
|
||||||
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
||||||
<ngx-mat-datetime-picker #occurrrence
|
<ngx-mat-datetime-picker #occurrrence
|
||||||
@@ -285,7 +285,7 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class-no-height width-100">
|
<div class="ion-input-class-no-height width-100">
|
||||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="_postEvent.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { ParticipantsPipe } from 'src/app/pipes/participants.pipe';
|
|||||||
import { ThemeService } from 'src/app/services/theme.service'
|
import { ThemeService } from 'src/app/services/theme.service'
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||||
|
import { ContactsService } from 'src/app/services/contacts.service'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit-event',
|
selector: 'app-edit-event',
|
||||||
@@ -73,6 +74,9 @@ export class EditEventPage implements OnInit {
|
|||||||
@ViewChild('inicio') inicio: any;
|
@ViewChild('inicio') inicio: any;
|
||||||
@ViewChild('picker1') picker1: any;
|
@ViewChild('picker1') picker1: any;
|
||||||
|
|
||||||
|
|
||||||
|
@Input() _postEvent: Event;
|
||||||
|
|
||||||
public options = [
|
public options = [
|
||||||
{ value: true, label: 'True' },
|
{ value: true, label: 'True' },
|
||||||
{ value: false, label: 'False' }
|
{ value: false, label: 'False' }
|
||||||
@@ -95,24 +99,39 @@ export class EditEventPage implements OnInit {
|
|||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
private attachmentsService: AttachmentsService,
|
private attachmentsService: AttachmentsService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private httpErrorHandle: HttpErrorHandle
|
private httpErrorHandle: HttpErrorHandle,
|
||||||
|
private contactsService: ContactsService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this._postEvent = this.postEvent
|
||||||
if(!this.restoreTemporaryData()) {
|
if(!this.restoreTemporaryData()) {
|
||||||
// clear
|
// clear
|
||||||
|
|
||||||
if(this.postEvent) {
|
if(this._postEvent) {
|
||||||
if( this.postEvent.Body){
|
if( this._postEvent.Body){
|
||||||
if(typeof(this.postEvent.Body.Text) == 'string'){
|
if(typeof(this._postEvent.Body.Text) == 'string'){
|
||||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
this._postEvent.Body.Text = this._postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.postEvent.Attendees != null) {
|
|
||||||
const result = this.participantsPipe.transform(this.postEvent.Attendees)
|
|
||||||
|
for(const index in this._postEvent.Attendees) {
|
||||||
|
const user = this._postEvent.Attendees[index]
|
||||||
|
|
||||||
|
const userData = this.contactsService.constacts.find(e => user.EmailAddress == e.EmailAddress)
|
||||||
|
if(userData) {
|
||||||
|
this._postEvent.Attendees[index].UserType = userData.UserType
|
||||||
|
} else {
|
||||||
|
console.log('user not set')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._postEvent.Attendees != null) {
|
||||||
|
const result = this.participantsPipe.transform(this._postEvent.Attendees)
|
||||||
this.taskParticipants = result.taskParticipants
|
this.taskParticipants = result.taskParticipants
|
||||||
this.taskParticipantsCc = result.taskParticipantsCc
|
this.taskParticipantsCc = result.taskParticipantsCc
|
||||||
|
|
||||||
@@ -124,23 +143,25 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initCalendarName = this.postEvent.CalendarName;
|
this.initCalendarName = this._postEvent.CalendarName;
|
||||||
|
|
||||||
this.getRecurrenceTypes();
|
this.getRecurrenceTypes();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString();
|
this._postEvent.EventRecurrence.Type = this._postEvent.EventRecurrence.Type.toString();
|
||||||
|
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
this.CalendarNameOwnerName = this.eventsService.detectCalendarNameByCalendarId(this.postEvent.CalendarId)
|
this.CalendarNameOwnerName = this.eventsService.detectCalendarNameByCalendarId(this._postEvent.CalendarId)
|
||||||
this.changeAgenda()
|
this.changeAgenda()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: any): void {
|
ngOnChanges(changes: any): void {
|
||||||
this.loadedEventAttachments = this.postEvent.Attachments
|
this.loadedEventAttachments = this._postEvent.Attachments
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
@@ -166,30 +187,30 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
injectValidation() {
|
injectValidation() {
|
||||||
|
|
||||||
if (typeof(this.postEvent.EventRecurrence.Type) == 'number') {
|
if (typeof(this._postEvent.EventRecurrence.Type) == 'number') {
|
||||||
const str: any = this.postEvent.EventRecurrence.Type.toString()
|
const str: any = this._postEvent.EventRecurrence.Type.toString()
|
||||||
this.postEvent.EventRecurrence.Type = str
|
this._postEvent.EventRecurrence.Type = str
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Form = new FormGroup({
|
this.Form = new FormGroup({
|
||||||
Subject: new FormControl(this.postEvent.Subject, [
|
Subject: new FormControl(this._postEvent.Subject, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
// Validators.minLength(4)
|
// Validators.minLength(4)
|
||||||
]),
|
]),
|
||||||
Location: new FormControl(this.postEvent.Location, [
|
Location: new FormControl(this._postEvent.Location, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
]),
|
]),
|
||||||
CalendarName: new FormControl(this.postEvent.CalendarName),
|
CalendarName: new FormControl(this._postEvent.CalendarName),
|
||||||
Categories: new FormControl(this.postEvent.Category, [
|
Categories: new FormControl(this._postEvent.Category, [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
dateOccurrence: new FormControl(this.postEvent.EventRecurrence.Type.toString() == '-1' ? ['ok']: this.postEvent.EventRecurrence.LastOccurrence && new Date(this.postEvent.EventRecurrence.LastOccurrence).getTime() > new Date(this.postEvent.EndDate).getTime() ? 'ok': null, [
|
dateOccurrence: new FormControl(this._postEvent.EventRecurrence.Type.toString() == '-1' ? ['ok']: this._postEvent.EventRecurrence.LastOccurrence && new Date(this._postEvent.EventRecurrence.LastOccurrence).getTime() > new Date(this._postEvent.EndDate).getTime() ? 'ok': null, [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
participantes: new FormControl(this.taskParticipants, [
|
participantes: new FormControl(this.taskParticipants, [
|
||||||
// Validators.required
|
// Validators.required
|
||||||
]),
|
]),
|
||||||
Date: new FormControl( new Date(this.postEvent.StartDate).toLocaleString('pt') <= new Date(this.postEvent.EndDate).toLocaleString('pt')? 'ok': null,[
|
Date: new FormControl( new Date(this._postEvent.StartDate).toLocaleString('pt') <= new Date(this._postEvent.EndDate).toLocaleString('pt')? 'ok': null,[
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
|
|
||||||
@@ -254,10 +275,10 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
if(ev.length > 1){
|
if(ev.length > 1){
|
||||||
|
|
||||||
this.postEvent.EventRecurrence.Type = ev.filter(data => data != '-1');
|
this._postEvent.EventRecurrence.Type = ev.filter(data => data != '-1');
|
||||||
}
|
}
|
||||||
if(ev.length == 0){
|
if(ev.length == 0){
|
||||||
this.postEvent.EventRecurrence.Type = "-1";
|
this._postEvent.EventRecurrence.Type = "-1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,10 +303,10 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
defineLastOccurrence(valor:number, opcao:boolean){
|
defineLastOccurrence(valor:number, opcao:boolean){
|
||||||
var time = new Date(this.postEvent.EndDate);
|
var time = new Date(this._postEvent.EndDate);
|
||||||
if (opcao == true) {
|
if (opcao == true) {
|
||||||
time.setDate(time.getDate() + valor);
|
time.setDate(time.getDate() + valor);
|
||||||
this.postEvent.EventRecurrence.LastOccurrence = time;
|
this._postEvent.EventRecurrence.LastOccurrence = time;
|
||||||
} else {
|
} else {
|
||||||
time = new Date(
|
time = new Date(
|
||||||
time.getFullYear() + valor,
|
time.getFullYear() + valor,
|
||||||
@@ -294,7 +315,7 @@ export class EditEventPage implements OnInit {
|
|||||||
time.getHours(),
|
time.getHours(),
|
||||||
time.getMinutes()
|
time.getMinutes()
|
||||||
);
|
);
|
||||||
this.postEvent.EventRecurrence.LastOccurrence = time;
|
this._postEvent.EventRecurrence.LastOccurrence = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -309,27 +330,27 @@ export class EditEventPage implements OnInit {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
this._postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||||
|
|
||||||
if(!this.postEvent.EventRecurrence.hasOwnProperty('Type')) {
|
if(!this._postEvent.EventRecurrence.hasOwnProperty('Type')) {
|
||||||
this.postEvent.EventRecurrence.Type = '-1'
|
this._postEvent.EventRecurrence.Type = '-1'
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.postEvent.EventRecurrence.Type == undefined) {
|
if(this._postEvent.EventRecurrence.Type == undefined) {
|
||||||
this.postEvent.EventRecurrence.Type = '-1'
|
this._postEvent.EventRecurrence.Type = '-1'
|
||||||
}
|
}
|
||||||
|
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||||
await this.eventsService.editEvent(this.postEvent, 2, 3).toPromise()
|
await this.eventsService.editEvent(this._postEvent, 2, 3).toPromise()
|
||||||
if(this.initCalendarName != this.postEvent.CalendarName) {
|
if(this.initCalendarName != this._postEvent.CalendarName) {
|
||||||
let body = {
|
let body = {
|
||||||
"EventId": this.postEvent.EventId,
|
"EventId": this._postEvent.EventId,
|
||||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
"CalendarDestinationName": this._postEvent.CalendarName,
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -339,11 +360,11 @@ export class EditEventPage implements OnInit {
|
|||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
||||||
} else {
|
} else {
|
||||||
await this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).toPromise()
|
await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
|
||||||
if(this.initCalendarName != this.postEvent.CalendarName) {
|
if(this.initCalendarName != this._postEvent.CalendarName) {
|
||||||
let body = {
|
let body = {
|
||||||
"EventId": this.postEvent.EventId,
|
"EventId": this._postEvent.EventId,
|
||||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
"CalendarDestinationName": this._postEvent.CalendarName,
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -382,7 +403,7 @@ export class EditEventPage implements OnInit {
|
|||||||
//data.selected
|
//data.selected
|
||||||
const DocumentToSave = {
|
const DocumentToSave = {
|
||||||
SourceTitle: e.SourceName,
|
SourceTitle: e.SourceName,
|
||||||
ParentId: this.postEvent.EventId,
|
ParentId: this._postEvent.EventId,
|
||||||
Source: '1',
|
Source: '1',
|
||||||
SourceId: e.SourceId,
|
SourceId: e.SourceId,
|
||||||
ApplicationId: e.ApplicationId.toString(),
|
ApplicationId: e.ApplicationId.toString(),
|
||||||
@@ -429,7 +450,7 @@ export class EditEventPage implements OnInit {
|
|||||||
saveTemporaryData() {
|
saveTemporaryData() {
|
||||||
|
|
||||||
window['temp.path:/home/agenda/edit-event.component.ts'] = {
|
window['temp.path:/home/agenda/edit-event.component.ts'] = {
|
||||||
postEvent: this.postEvent,
|
postEvent: this._postEvent,
|
||||||
eventBody: this.eventBody,
|
eventBody: this.eventBody,
|
||||||
segment: this.segment
|
segment: this.segment
|
||||||
}
|
}
|
||||||
@@ -440,7 +461,7 @@ export class EditEventPage implements OnInit {
|
|||||||
const restoredData = window['temp.path:/home/agenda/edit-event.component.ts']
|
const restoredData = window['temp.path:/home/agenda/edit-event.component.ts']
|
||||||
|
|
||||||
if(JSON.stringify(restoredData) != "{}" && undefined != restoredData){
|
if(JSON.stringify(restoredData) != "{}" && undefined != restoredData){
|
||||||
this.postEvent = restoredData.postEvent
|
this._postEvent = restoredData.postEvent
|
||||||
this.eventBody = restoredData.eventBody
|
this.eventBody = restoredData.eventBody
|
||||||
this.segment = restoredData.segment
|
this.segment = restoredData.segment
|
||||||
|
|
||||||
@@ -456,7 +477,7 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getAttachments(eventId: string){
|
async getAttachments(eventId: string){
|
||||||
if(this.postEvent.HasAttachments) {
|
if(this._postEvent.HasAttachments) {
|
||||||
let rest: any;
|
let rest: any;
|
||||||
try {
|
try {
|
||||||
rest = this.attachmentsService.getAttachmentsById(eventId).toPromise()
|
rest = this.attachmentsService.getAttachmentsById(eventId).toPromise()
|
||||||
@@ -497,7 +518,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
const ApplicationIdDocumentToSave: any = {
|
const ApplicationIdDocumentToSave: any = {
|
||||||
SourceName: data.selected.Assunto,
|
SourceName: data.selected.Assunto,
|
||||||
ParentId: this.postEvent.EventId,
|
ParentId: this._postEvent.EventId,
|
||||||
SourceId: data.selected.Id,
|
SourceId: data.selected.Id,
|
||||||
Stakeholders: data.selected.Stakeholders | data.selected.EntidadeOrganicaNome,
|
Stakeholders: data.selected.Stakeholders | data.selected.EntidadeOrganicaNome,
|
||||||
ApplicationId: data.selected.ApplicationType.toString(),
|
ApplicationId: data.selected.ApplicationType.toString(),
|
||||||
@@ -528,11 +549,11 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial']) {
|
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial']) {
|
||||||
this.CalendarNamesOptions = ['Oficial']
|
this.CalendarNamesOptions = ['Oficial']
|
||||||
this.postEvent.CalendarName = 'Oficial'
|
this._postEvent.CalendarName = 'Oficial'
|
||||||
|
|
||||||
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
} else if (this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||||
this.CalendarNamesOptions = ['Pessoal']
|
this.CalendarNamesOptions = ['Pessoal']
|
||||||
this.postEvent.CalendarName = 'Pessoal'
|
this._postEvent.CalendarName = 'Pessoal'
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "54a6fb5b6",
|
"shortSHA": "4109e30d0",
|
||||||
"SHA": "54a6fb5b6eb5d1afc53a6067dfd64519c3c3fa87",
|
"SHA": "4109e30d0772063fe33a0d1313dda48a2f1d808c",
|
||||||
"branch": "developer-catch-merge",
|
"branch": "developer-catch-merge",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Eudes Inácio'",
|
||||||
"lastCommitTime": "'Mon Jul 24 13:52:48 2023 +0100'",
|
"lastCommitTime": "'Wed Jul 26 09:47:31 2023 +0100'",
|
||||||
"lastCommitMessage": "change",
|
"lastCommitMessage": "Notification stop duplication",
|
||||||
"lastCommitNumber": "5107",
|
"lastCommitNumber": "5108",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch developer-catch-merge\nYour branch is behind 'origin/developer-catch-merge' by 3 commits, and can be fast-forwarded.\n (use \"git pull\" to update your local branch)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/services/notifications.service.ts",
|
"changeStatus": "On branch developer-catch-merge\nYour branch and 'origin/developer-catch-merge' have diverged,\nand have 1 and 4 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tmodified: src/app/modals/profile/profile.page.scss\n\tmodified: src/app/models/Excludetask.ts\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts\n\tmodified: src/app/services/contacts.service.ts\n\tmodified: src/app/services/processes.service.ts\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.html\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.ts",
|
||||||
"changeAuthor": "eudes.inacio"
|
"changeAuthor": "eudes.inacio"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user