mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
change text, fixe create and edit event
This commit is contained in:
@@ -87,7 +87,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
sesseionStora = SessionStore
|
sesseionStora = SessionStore
|
||||||
environment = environment
|
environment = environment
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
@@ -111,7 +111,7 @@ export class EditEventPage implements OnInit {
|
|||||||
this.initCalendarName = this.postEvent.CalendarName;
|
this.initCalendarName = this.postEvent.CalendarName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for(const index in this.postEvent.Attendees) {
|
for(const index in this.postEvent.Attendees) {
|
||||||
const user = this.postEvent.Attendees[index]
|
const user = this.postEvent.Attendees[index]
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ export class EditEventPage implements OnInit {
|
|||||||
if(userData) {
|
if(userData) {
|
||||||
this.postEvent.Attendees[index].UserType = userData.UserType
|
this.postEvent.Attendees[index].UserType = userData.UserType
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -199,13 +199,13 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
|
|
||||||
this.router.navigate(['/home',this.caller]);
|
this.router.navigate(['/home',this.caller]);
|
||||||
}
|
}
|
||||||
|
|
||||||
getRecurrenceTypes() {
|
getRecurrenceTypes() {
|
||||||
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
||||||
|
|
||||||
this.recurringTypes = res;
|
this.recurringTypes = res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -216,7 +216,7 @@ export class EditEventPage implements OnInit {
|
|||||||
date.setSeconds(0);
|
date.setSeconds(0);
|
||||||
|
|
||||||
if(minutes % 15 != 0) {
|
if(minutes % 15 != 0) {
|
||||||
|
|
||||||
if (minutes > 45) {
|
if (minutes > 45) {
|
||||||
date.setMinutes(60)
|
date.setMinutes(60)
|
||||||
} else if (minutes > 30) {
|
} else if (minutes > 30) {
|
||||||
@@ -227,7 +227,7 @@ export class EditEventPage implements OnInit {
|
|||||||
date.setMinutes(15)
|
date.setMinutes(15)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return date
|
return date
|
||||||
}
|
}
|
||||||
@@ -236,15 +236,15 @@ export class EditEventPage implements OnInit {
|
|||||||
const _date = new Date(date);
|
const _date = new Date(date);
|
||||||
const minutes = _date .getMinutes();
|
const minutes = _date .getMinutes();
|
||||||
_date .setMinutes(minutes + 15)
|
_date .setMinutes(minutes + 15)
|
||||||
return _date
|
return _date
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelectedRecurringChanged(ev?:any) {
|
onSelectedRecurringChanged(ev?:any) {
|
||||||
|
|
||||||
this.calculetedLastOccurrence(ev);
|
this.calculetedLastOccurrence(ev);
|
||||||
|
|
||||||
if(ev.length > 1){
|
if(ev.length > 1){
|
||||||
|
|
||||||
this.selectedRecurringType = ev.filter(data => data != '-1');
|
this.selectedRecurringType = ev.filter(data => data != '-1');
|
||||||
}
|
}
|
||||||
if(ev.length == 0){
|
if(ev.length == 0){
|
||||||
@@ -254,7 +254,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
calculetedLastOccurrence(type:number){
|
calculetedLastOccurrence(type:number){
|
||||||
// console.log(type);
|
// console.log(type);
|
||||||
var valor;
|
var valor;
|
||||||
var opcao: boolean;
|
var opcao: boolean;
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
valor = 7;
|
valor = 7;
|
||||||
@@ -280,15 +280,15 @@ export class EditEventPage implements OnInit {
|
|||||||
this.postEvent.EventRecurrence.LastOccurrence = time;
|
this.postEvent.EventRecurrence.LastOccurrence = time;
|
||||||
} else {
|
} else {
|
||||||
time = new Date(
|
time = new Date(
|
||||||
time.getFullYear() + valor,
|
time.getFullYear() + valor,
|
||||||
time.getMonth(),
|
time.getMonth(),
|
||||||
time.getDate(),
|
time.getDate(),
|
||||||
time.getHours(),
|
time.getHours(),
|
||||||
time.getMinutes()
|
time.getMinutes()
|
||||||
);
|
);
|
||||||
this.postEvent.EventRecurrence.LastOccurrence = time;
|
this.postEvent.EventRecurrence.LastOccurrence = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ export class EditEventPage implements OnInit {
|
|||||||
openInicio() {
|
openInicio() {
|
||||||
let input: any = document.querySelector('#new-inicio')
|
let input: any = document.querySelector('#new-inicio')
|
||||||
if(input) {
|
if(input) {
|
||||||
|
|
||||||
input.click()
|
input.click()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -366,7 +366,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||||
|
|
||||||
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||||
|
|
||||||
if(window['reloadCalendar']) {
|
if(window['reloadCalendar']) {
|
||||||
@@ -374,7 +374,7 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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,
|
||||||
@@ -384,11 +384,11 @@ export class EditEventPage implements OnInit {
|
|||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
finally {
|
finally {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
||||||
|
|
||||||
}, error => {
|
}, error => {
|
||||||
this.httpErrorHandle.httpStatusHandle(error)
|
this.httpErrorHandle.httpStatusHandle(error)
|
||||||
});
|
});
|
||||||
@@ -398,9 +398,9 @@ export class EditEventPage implements OnInit {
|
|||||||
if(window['reloadCalendar']) {
|
if(window['reloadCalendar']) {
|
||||||
window['reloadCalendar']()
|
window['reloadCalendar']()
|
||||||
}
|
}
|
||||||
|
|
||||||
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,
|
||||||
@@ -410,22 +410,22 @@ export class EditEventPage implements OnInit {
|
|||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
finally {
|
finally {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
||||||
|
|
||||||
}, error => {
|
}, error => {
|
||||||
this.httpErrorHandle.httpStatusHandle(error)
|
this.httpErrorHandle.httpStatusHandle(error)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.isEventEdited = true;
|
this.isEventEdited = true;
|
||||||
|
|
||||||
|
|
||||||
/* await this.saveDocument() */
|
await this.saveDocument()
|
||||||
|
|
||||||
this.goBack();
|
this.goBack();
|
||||||
}
|
}
|
||||||
@@ -434,7 +434,7 @@ export class EditEventPage implements OnInit {
|
|||||||
async saveDocument() {
|
async saveDocument() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
for( let e of this.loadedEventAttachments) {
|
for( let e of this.loadedEventAttachments) {
|
||||||
const id: any = e.Id
|
const id: any = e.Id
|
||||||
const remove = e['remove']
|
const remove = e['remove']
|
||||||
@@ -452,7 +452,7 @@ export class EditEventPage implements OnInit {
|
|||||||
SerialNumber: '',
|
SerialNumber: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
|
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
|
||||||
|
|
||||||
} else if(remove) {
|
} else if(remove) {
|
||||||
await this.attachmentsService.deleteEventAttachmentById(e.Id).toPromise()
|
await this.attachmentsService.deleteEventAttachmentById(e.Id).toPromise()
|
||||||
@@ -461,7 +461,7 @@ export class EditEventPage implements OnInit {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modalController.dismiss({
|
this.modalController.dismiss({
|
||||||
@@ -545,13 +545,13 @@ export class EditEventPage implements OnInit {
|
|||||||
if(this.postEvent.HasAttachments) {
|
if(this.postEvent.HasAttachments) {
|
||||||
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
||||||
this.loadedEventAttachments = res;
|
this.loadedEventAttachments = res;
|
||||||
|
|
||||||
},((erro) => {
|
},((erro) => {
|
||||||
console.error('editgetAttchament', erro)
|
console.error('editgetAttchament', erro)
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteAttachment(attachmentID: string, index) {
|
deleteAttachment(attachmentID: string, index) {
|
||||||
@@ -597,7 +597,7 @@ export class EditEventPage implements OnInit {
|
|||||||
SerialNumber: '',
|
SerialNumber: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
||||||
this.postEvent.Attachments = this.loadedEventAttachments;
|
this.postEvent.Attachments = this.loadedEventAttachments;
|
||||||
|
|
||||||
@@ -613,17 +613,17 @@ export class EditEventPage implements OnInit {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
if(this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
if(this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||||
|
|
||||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||||
|
|
||||||
} 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,7 +1,7 @@
|
|||||||
<ion-header class="ion-no-border header-2">
|
<ion-header class="ion-no-border header-2">
|
||||||
<app-task-list-header
|
<app-task-list-header
|
||||||
[goBackButton] = true
|
[goBackButton] = true
|
||||||
[headerName] = environment.dispatchPR
|
[headerName] = headerName
|
||||||
[ordinance] = ordinance
|
[ordinance] = ordinance
|
||||||
[loading] = skeletonLoader
|
[loading] = skeletonLoader
|
||||||
(reorderList) = reorderList($event)
|
(reorderList) = reorderList($event)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
|||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { TaskService } from 'src/app/services/task.service'
|
import { TaskService } from 'src/app/services/task.service'
|
||||||
import { RouteService } from 'src/app/services/route.service';
|
import { RouteService } from 'src/app/services/route.service';
|
||||||
|
import { PermissionService } from 'src/app/services/permission.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-despachos-pr',
|
selector: 'app-despachos-pr',
|
||||||
@@ -58,6 +59,7 @@ export class DespachosPrPage implements OnInit {
|
|||||||
list = []
|
list = []
|
||||||
|
|
||||||
ordinance: string = 'old'
|
ordinance: string = 'old'
|
||||||
|
headerName = ''
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
@@ -69,10 +71,16 @@ export class DespachosPrPage implements OnInit {
|
|||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
public TaskService: TaskService,
|
public TaskService: TaskService,
|
||||||
private RouteService: RouteService,
|
private RouteService: RouteService,
|
||||||
|
public p: PermissionService,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.profile = 'mdgpr';
|
this.profile = 'mdgpr';
|
||||||
|
|
||||||
|
if(this.p.userPermission([this.p.permissionList.Gabinete.md_tasks])) {
|
||||||
|
this.headerName = `Despachos ${ environment.despachoLabel }`
|
||||||
|
} else {
|
||||||
|
this.headerName = "Despachos criados por mim"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -97,7 +105,7 @@ export class DespachosPrPage implements OnInit {
|
|||||||
this.backgroundservice.registerBackService('Online', () => {
|
this.backgroundservice.registerBackService('Online', () => {
|
||||||
this.LoadList()
|
this.LoadList()
|
||||||
});
|
});
|
||||||
|
|
||||||
this.dynamicSearch()
|
this.dynamicSearch()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +123,7 @@ export class DespachosPrPage implements OnInit {
|
|||||||
async dynamicSearch() {
|
async dynamicSearch() {
|
||||||
|
|
||||||
if(this.showSearch && this.searchSubject) {
|
if(this.showSearch && this.searchSubject) {
|
||||||
|
|
||||||
const searchedList =this.TaskService.despachoprstore.list.filter((task) => {
|
const searchedList =this.TaskService.despachoprstore.list.filter((task) => {
|
||||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||||
subject = subject.toLowerCase();
|
subject = subject.toLowerCase();
|
||||||
@@ -124,7 +132,7 @@ export class DespachosPrPage implements OnInit {
|
|||||||
|
|
||||||
this.list = this.TaskService.reorderList(this.ordinance, searchedList)
|
this.list = this.TaskService.reorderList(this.ordinance, searchedList)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const list = this.TaskService.despachoprstore.list
|
const list = this.TaskService.despachoprstore.list
|
||||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||||
}
|
}
|
||||||
@@ -144,7 +152,7 @@ export class DespachosPrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openExpedientDetailPage(data) {
|
openExpedientDetailPage(data) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async LoadList() {
|
async LoadList() {
|
||||||
@@ -156,25 +164,25 @@ export class DespachosPrPage implements OnInit {
|
|||||||
let result = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
let result = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||||
this.despachoList = [];
|
this.despachoList = [];
|
||||||
this.skeletonLoader = false;
|
this.skeletonLoader = false;
|
||||||
|
|
||||||
|
|
||||||
let despachosPr;
|
let despachosPr;
|
||||||
let despachos = this.sortService.sortArrayByDate(result);
|
let despachos = this.sortService.sortArrayByDate(result);
|
||||||
|
|
||||||
if(SessionStore.user.Profile != "PR") {
|
if(SessionStore.user.Profile != "PR") {
|
||||||
|
|
||||||
|
|
||||||
if(SessionStore.user.Profile != 'Consultant') {
|
if(SessionStore.user.Profile != 'Consultant') {
|
||||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
||||||
} else {
|
} else {
|
||||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Gerar Diploma" || data.activityInstanceName == "Retificar Diploma");
|
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Gerar Diploma" || data.activityInstanceName == "Retificar Diploma");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (SessionStore.user.Profile == "PR") {
|
} else if (SessionStore.user.Profile == "PR") {
|
||||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
|
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
despachosPr = despachosPr.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
despachosPr = despachosPr.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||||
|
|
||||||
despachosPr.forEach((element, index) => {
|
despachosPr.forEach((element, index) => {
|
||||||
@@ -188,12 +196,12 @@ export class DespachosPrPage implements OnInit {
|
|||||||
this.despachoList.push(task);
|
this.despachoList.push(task);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
this.despachoList = this.sortService.sortDate(this.despachoList, 'CreateDate')
|
this.despachoList = this.sortService.sortDate(this.despachoList, 'CreateDate')
|
||||||
this.despachoprstore.reset(this.despachoList)
|
this.despachoprstore.reset(this.despachoList)
|
||||||
|
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.skeletonLoader = false
|
this.skeletonLoader = false
|
||||||
@@ -217,7 +225,7 @@ export class DespachosPrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async viewExpedientDetail(serialNumber: any) {
|
async viewExpedientDetail(serialNumber: any) {
|
||||||
|
|
||||||
|
|
||||||
let classs;
|
let classs;
|
||||||
if (window.innerWidth <= 800) {
|
if (window.innerWidth <= 800) {
|
||||||
@@ -235,9 +243,9 @@ export class DespachosPrPage implements OnInit {
|
|||||||
},
|
},
|
||||||
cssClass: classs,
|
cssClass: classs,
|
||||||
});
|
});
|
||||||
|
|
||||||
modal.onDidDismiss().then((res) => {
|
modal.onDidDismiss().then((res) => {
|
||||||
|
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|||||||
@@ -50,7 +50,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom-title d-flex">
|
<div class="bottom-title d-flex">
|
||||||
<h3 class="bottom-text">Diplomas por Assinar PR</h3>
|
<h3 class="bottom-text" *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Diplomas por Assinar PR</h3>
|
||||||
|
<h3 class="bottom-text" *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas para Assinar PR</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
@@ -143,4 +144,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -3,21 +3,21 @@
|
|||||||
:host{
|
:host{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-2 {
|
.header-2 {
|
||||||
border-top-right-radius: 24px;
|
border-top-right-radius: 24px;
|
||||||
border-top-left-radius: 24px;
|
border-top-left-radius: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ion-content, .header-2, .main-content{
|
ion-content, .header-2, .main-content{
|
||||||
padding: 30px 20px 0 20px !important;
|
padding: 30px 20px 0 20px !important;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content {
|
.main-content {
|
||||||
padding-top: 0px !important;
|
padding-top: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title{
|
.title{
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
font-size: rem(25);
|
font-size: rem(25);
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
.bottom-text{
|
.bottom-text{
|
||||||
font-size: rem(15) !important;
|
font-size: rem(15) !important;
|
||||||
font-family: Roboto !important;
|
font-family: Roboto !important;
|
||||||
color: #0d89d1 !important;
|
color: black !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-list-small{
|
.item-list-small{
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
}
|
}
|
||||||
.ion-item-class{
|
.ion-item-class{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
.label-text{
|
.label-text{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -97,7 +97,7 @@ ion-item{
|
|||||||
.div-icon ion-icon{
|
.div-icon ion-icon{
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
.div-content-expediente p, .div-content-pendentes p{
|
.div-content-expediente p, .div-content-pendentes p{
|
||||||
font-size: rem(19);
|
font-size: rem(19);
|
||||||
@@ -176,7 +176,7 @@ ion-item{
|
|||||||
.exp-workflow{
|
.exp-workflow{
|
||||||
float: left;
|
float: left;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
|
|
||||||
.label{
|
.label{
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
background: var(--label-bg-color);
|
background: var(--label-bg-color);
|
||||||
@@ -239,4 +239,5 @@ ion-item{
|
|||||||
font-size: rem(45);
|
font-size: rem(45);
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
|||||||
import { DeplomasStore } from 'src/app/store/deplomas.service';
|
import { DeplomasStore } from 'src/app/store/deplomas.service';
|
||||||
import { TaskService } from 'src/app/services/task.service'
|
import { TaskService } from 'src/app/services/task.service'
|
||||||
import { RouteService } from 'src/app/services/route.service';
|
import { RouteService } from 'src/app/services/route.service';
|
||||||
|
import { PermissionService } from 'src/app/services/permission.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-diplomas-assinar',
|
selector: 'app-diplomas-assinar',
|
||||||
@@ -37,7 +38,8 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
public TaskService: TaskService,
|
public TaskService: TaskService,
|
||||||
private RouteService: RouteService,) {
|
private RouteService: RouteService,
|
||||||
|
public p: PermissionService,) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -69,7 +71,7 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
async dynamicSearch() {
|
async dynamicSearch() {
|
||||||
|
|
||||||
if(this.showSearch && this.searchSubject) {
|
if(this.showSearch && this.searchSubject) {
|
||||||
|
|
||||||
const list = this.TaskService.despachoStore.list.filter((task) => {
|
const list = this.TaskService.despachoStore.list.filter((task) => {
|
||||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||||
subject = subject.toLowerCase();
|
subject = subject.toLowerCase();
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for(const index in this._postEvent.Attendees) {
|
for(const index in this._postEvent.Attendees) {
|
||||||
const user = this._postEvent.Attendees[index]
|
const user = this._postEvent.Attendees[index]
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ export class EditEventPage implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
console.log('user not set')
|
console.log('user not set')
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._postEvent.Attendees != null) {
|
if (this._postEvent.Attendees != null) {
|
||||||
@@ -149,7 +149,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this._postEvent.EventRecurrence.Type = this._postEvent.EventRecurrence.Type.toString();
|
this._postEvent.EventRecurrence.Type = this._postEvent.EventRecurrence.Type.toString();
|
||||||
|
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
getRecurrenceTypes() {
|
getRecurrenceTypes() {
|
||||||
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
||||||
|
|
||||||
this.recurringTypes = res;
|
this.recurringTypes = res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -234,7 +234,7 @@ export class EditEventPage implements OnInit {
|
|||||||
openInicio() {
|
openInicio() {
|
||||||
let input: any = document.querySelector('#new-inicio')
|
let input: any = document.querySelector('#new-inicio')
|
||||||
if(input) {
|
if(input) {
|
||||||
|
|
||||||
input.click()
|
input.click()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,7 @@ export class EditEventPage implements OnInit {
|
|||||||
date.setSeconds(0);
|
date.setSeconds(0);
|
||||||
|
|
||||||
if(minutes % 15 != 0) {
|
if(minutes % 15 != 0) {
|
||||||
|
|
||||||
if (minutes > 45) {
|
if (minutes > 45) {
|
||||||
date.setMinutes(60)
|
date.setMinutes(60)
|
||||||
} else if (minutes > 30) {
|
} else if (minutes > 30) {
|
||||||
@@ -270,7 +270,7 @@ export class EditEventPage implements OnInit {
|
|||||||
date.setMinutes(15)
|
date.setMinutes(15)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return date
|
return date
|
||||||
}
|
}
|
||||||
@@ -279,15 +279,15 @@ export class EditEventPage implements OnInit {
|
|||||||
const _date = new Date(date);
|
const _date = new Date(date);
|
||||||
const minutes = _date .getMinutes();
|
const minutes = _date .getMinutes();
|
||||||
_date .setMinutes(minutes + 15)
|
_date .setMinutes(minutes + 15)
|
||||||
return _date
|
return _date
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelectedRecurringChanged(ev:any){
|
onSelectedRecurringChanged(ev:any){
|
||||||
|
|
||||||
this.calculetedLastOccurrence(ev);
|
this.calculetedLastOccurrence(ev);
|
||||||
|
|
||||||
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){
|
||||||
@@ -296,7 +296,7 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
calculetedLastOccurrence(type:number){
|
calculetedLastOccurrence(type:number){
|
||||||
var valor;
|
var valor;
|
||||||
var opcao: boolean;
|
var opcao: boolean;
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
valor = 7;
|
valor = 7;
|
||||||
@@ -322,15 +322,15 @@ export class EditEventPage implements OnInit {
|
|||||||
this._postEvent.EventRecurrence.LastOccurrence = time;
|
this._postEvent.EventRecurrence.LastOccurrence = time;
|
||||||
} else {
|
} else {
|
||||||
time = new Date(
|
time = new Date(
|
||||||
time.getFullYear() + valor,
|
time.getFullYear() + valor,
|
||||||
time.getMonth(),
|
time.getMonth(),
|
||||||
time.getDate(),
|
time.getDate(),
|
||||||
time.getHours(),
|
time.getHours(),
|
||||||
time.getMinutes()
|
time.getMinutes()
|
||||||
);
|
);
|
||||||
this._postEvent.EventRecurrence.LastOccurrence = time;
|
this._postEvent.EventRecurrence.LastOccurrence = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -358,14 +358,14 @@ export class EditEventPage implements OnInit {
|
|||||||
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 {
|
||||||
await this.eventsService.changeAgenda(body).toPromise();
|
await this.eventsService.changeAgenda(body).toPromise();
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
@@ -379,7 +379,7 @@ export class EditEventPage implements OnInit {
|
|||||||
"EventId": this._postEvent.EventId,
|
"EventId": this._postEvent.EventId,
|
||||||
"CalendarDestinationName": this._postEvent.CalendarName,
|
"CalendarDestinationName": this._postEvent.CalendarName,
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.eventsService.changeAgenda(body).toPromise();
|
await this.eventsService.changeAgenda(body).toPromise();
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
@@ -397,7 +397,7 @@ export class EditEventPage implements OnInit {
|
|||||||
this.clearPostEvent.emit();
|
this.clearPostEvent.emit();
|
||||||
this.deleteTemporaryData();
|
this.deleteTemporaryData();
|
||||||
|
|
||||||
/* await this.saveDocument() */
|
await this.saveDocument()
|
||||||
|
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
@@ -407,7 +407,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
for( let e of this.loadedEventAttachments) {
|
for( let e of this.loadedEventAttachments) {
|
||||||
const id: any = e.Id
|
const id: any = e.Id
|
||||||
const remove = e['remove']
|
const remove = e['remove']
|
||||||
@@ -425,7 +425,7 @@ export class EditEventPage implements OnInit {
|
|||||||
SerialNumber: '',
|
SerialNumber: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
|
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
|
||||||
|
|
||||||
} else if(remove) {
|
} else if(remove) {
|
||||||
await this.attachmentsService.deleteEventAttachmentById(e.Id).toPromise()
|
await this.attachmentsService.deleteEventAttachmentById(e.Id).toPromise()
|
||||||
@@ -527,7 +527,7 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
modal.onDidDismiss().then( async (res) => {
|
modal.onDidDismiss().then( async (res) => {
|
||||||
if(res) {
|
if(res) {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
|
|
||||||
@@ -559,17 +559,17 @@ export class EditEventPage implements OnInit {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
if(this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
if(this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Oficial'] && this.eventsService.calendarNamesType[this.CalendarNameOwnerName]?.['Pessoal']) {
|
||||||
|
|
||||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||||
|
|
||||||
} 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']
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<app-task-list-header
|
<app-task-list-header
|
||||||
class="width-100 height-100"
|
class="width-100 height-100"
|
||||||
[goBackButton] = false
|
[goBackButton] = false
|
||||||
[headerName] = environment.dispatchPR
|
[headerName] = headerName
|
||||||
[ordinance] = ordinance
|
[ordinance] = ordinance
|
||||||
[loading] = skeletonLoader
|
[loading] = skeletonLoader
|
||||||
[loaderTop] = true
|
[loaderTop] = true
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { SessionStore } from 'src/app/store/session.service';
|
|||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { TaskService } from 'src/app/services/task.service'
|
import { TaskService } from 'src/app/services/task.service'
|
||||||
import { ThemeService } from 'src/app/services/theme.service'
|
import { ThemeService } from 'src/app/services/theme.service'
|
||||||
|
import { PermissionService } from 'src/app/services/permission.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-despachos-pr',
|
selector: 'app-despachos-pr',
|
||||||
@@ -24,7 +24,7 @@ export class DespachosPrPage implements OnInit {
|
|||||||
despachosprstore = DespachosprStore;
|
despachosprstore = DespachosprStore;
|
||||||
environment = environment
|
environment = environment
|
||||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||||
//
|
//
|
||||||
showSearch = false
|
showSearch = false
|
||||||
searchSubject = ''
|
searchSubject = ''
|
||||||
list = []
|
list = []
|
||||||
@@ -34,14 +34,23 @@ export class DespachosPrPage implements OnInit {
|
|||||||
delete(): void;
|
delete(): void;
|
||||||
}
|
}
|
||||||
routerSubscription;
|
routerSubscription;
|
||||||
|
headerName = ''
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public TaskService: TaskService,
|
public TaskService: TaskService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
|
public p: PermissionService,
|
||||||
|
|
||||||
) {
|
) {
|
||||||
this.loggeduser = SessionStore.user;
|
this.loggeduser = SessionStore.user;
|
||||||
|
|
||||||
|
|
||||||
|
if(this.p.userPermission([this.p.permissionList.Gabinete.md_tasks])) {
|
||||||
|
this.headerName = `Despachos ${ environment.despachoLabel }`
|
||||||
|
} else {
|
||||||
|
this.headerName = "Despachos criados por mim"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -52,9 +61,9 @@ constructor (
|
|||||||
this.listSubscription = this.despachosprstore.registerCallback({
|
this.listSubscription = this.despachosprstore.registerCallback({
|
||||||
id: import.meta.url,
|
id: import.meta.url,
|
||||||
funx:() => {
|
funx:() => {
|
||||||
|
|
||||||
this.dynamicSearch()
|
this.dynamicSearch()
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -103,7 +112,7 @@ constructor (
|
|||||||
async dynamicSearch() {
|
async dynamicSearch() {
|
||||||
|
|
||||||
if(this.showSearch && this.searchSubject) {
|
if(this.showSearch && this.searchSubject) {
|
||||||
|
|
||||||
const list = this.despachosprstore.list.filter((task) => {
|
const list = this.despachosprstore.list.filter((task) => {
|
||||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||||
subject = subject.toLowerCase();
|
subject = subject.toLowerCase();
|
||||||
@@ -142,14 +151,14 @@ constructor (
|
|||||||
doRefresh(event) {
|
doRefresh(event) {
|
||||||
if (event) {
|
if (event) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
event?.target?.complete();
|
event?.target?.complete();
|
||||||
} catch(error) {}
|
} catch(error) {}
|
||||||
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<ion-header class="ion-no-border">
|
<ion-header class="ion-no-border">
|
||||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="thetitle"><ion-label >Diplomas para assinar</ion-label></div>
|
<div class="thetitle"><ion-label *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" >Diplomas por Assinar PR</ion-label></div>
|
||||||
|
<div class="thetitle"><ion-label *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" >Diplomas para assinar PR</ion-label></div>
|
||||||
<div class="theicon d-flex align-center">
|
<div class="theicon d-flex align-center">
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
|
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
|
||||||
@@ -22,24 +23,24 @@
|
|||||||
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' (ngModelChange)="dynamicSearch()"
|
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' (ngModelChange)="dynamicSearch()"
|
||||||
class="search-input text-black" type="search" placeholder="Pesquisar"></ion-input>
|
class="search-input text-black" type="search" placeholder="Pesquisar"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div (click)="basicSearch()" class="d-flex align-center icon">
|
<div (click)="basicSearch()" class="d-flex align-center icon">
|
||||||
|
|
||||||
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
|
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
|
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
|
||||||
|
|
||||||
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
|
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
|
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
|
||||||
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
|
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,33 +49,33 @@
|
|||||||
<div>
|
<div>
|
||||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||||
<mat-select [(value)]="filterName">
|
<mat-select [(value)]="filterName">
|
||||||
|
|
||||||
<mat-option value="Para hoje" >
|
<mat-option value="Para hoje" >
|
||||||
Para hoje
|
Para hoje
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
<mat-option value="Novos" >
|
<mat-option value="Novos" >
|
||||||
Novas
|
Novas
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
<mat-option value="Lidos" >
|
<mat-option value="Lidos" >
|
||||||
Lidas
|
Lidas
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
<mat-option value="Não lidos" >
|
<mat-option value="Não lidos" >
|
||||||
Não lidas
|
Não lidas
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
|
|
||||||
<mat-option value="OverdueTasks">
|
<mat-option value="OverdueTasks">
|
||||||
Em atraso
|
Em atraso
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
<mat-option value="Todos" >
|
<mat-option value="Todos" >
|
||||||
Todas
|
Todas
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { NavigationStart, Router } from '@angular/router';
|
import { NavigationStart, Router } from '@angular/router';
|
||||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
|
||||||
import { ProcessesService } from 'src/app/services/processes.service';
|
|
||||||
import { DeplomasStore } from 'src/app/store/deplomas.service';
|
import { DeplomasStore } from 'src/app/store/deplomas.service';
|
||||||
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||||
import { SortService } from 'src/app/services/functions/sort.service';
|
|
||||||
import { ThemeService } from 'src/app/services/theme.service'
|
import { ThemeService } from 'src/app/services/theme.service'
|
||||||
import { TaskService } from 'src/app/services/task.service'
|
import { TaskService } from 'src/app/services/task.service'
|
||||||
|
import { PermissionService } from 'src/app/services/permission.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-diplomas-assinar',
|
selector: 'app-diplomas-assinar',
|
||||||
@@ -21,7 +19,7 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
deplomasStore = DeplomasStore
|
deplomasStore = DeplomasStore
|
||||||
customTaskPipe = new CustomTaskPipe()
|
customTaskPipe = new CustomTaskPipe()
|
||||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||||
//
|
//
|
||||||
showSearch = false
|
showSearch = false
|
||||||
searchSubject = ''
|
searchSubject = ''
|
||||||
list = []
|
list = []
|
||||||
@@ -36,7 +34,8 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
public TaskService: TaskService
|
public TaskService: TaskService,
|
||||||
|
public p: PermissionService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -48,9 +47,9 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
this.listSubscription = this.deplomasStore.registerCallback({
|
this.listSubscription = this.deplomasStore.registerCallback({
|
||||||
id: import.meta.url,
|
id: import.meta.url,
|
||||||
funx:() => {
|
funx:() => {
|
||||||
|
|
||||||
this.dynamicSearch()
|
this.dynamicSearch()
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -69,7 +68,7 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.listSubscription.delete()
|
this.listSubscription.delete()
|
||||||
|
|
||||||
this.routerSubscription?.unsubscribe();
|
this.routerSubscription?.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +83,7 @@ export class DiplomasAssinarPage implements OnInit {
|
|||||||
async dynamicSearch() {
|
async dynamicSearch() {
|
||||||
|
|
||||||
if(this.showSearch && this.searchSubject) {
|
if(this.showSearch && this.searchSubject) {
|
||||||
|
|
||||||
const list = this.deplomasStore.diplomasParaAssinarList.filter((task) => {
|
const list = this.deplomasStore.diplomasParaAssinarList.filter((task) => {
|
||||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||||
subject = subject.toLowerCase();
|
subject = subject.toLowerCase();
|
||||||
|
|||||||
Reference in New Issue
Block a user