mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
change text, fixe create and edit event
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<ion-header class="ion-no-border header-2">
|
||||
<app-task-list-header
|
||||
[goBackButton] = true
|
||||
[headerName] = environment.dispatchPR
|
||||
[headerName] = headerName
|
||||
[ordinance] = ordinance
|
||||
[loading] = skeletonLoader
|
||||
(reorderList) = reorderList($event)
|
||||
|
||||
@@ -16,6 +16,7 @@ import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos-pr',
|
||||
@@ -58,6 +59,7 @@ export class DespachosPrPage implements OnInit {
|
||||
list = []
|
||||
|
||||
ordinance: string = 'old'
|
||||
headerName = ''
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
@@ -69,10 +71,16 @@ export class DespachosPrPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
public TaskService: TaskService,
|
||||
private RouteService: RouteService,
|
||||
public p: PermissionService,
|
||||
) {
|
||||
|
||||
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() {
|
||||
@@ -97,7 +105,7 @@ export class DespachosPrPage implements OnInit {
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.LoadList()
|
||||
});
|
||||
|
||||
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
@@ -115,7 +123,7 @@ export class DespachosPrPage implements OnInit {
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
|
||||
const searchedList =this.TaskService.despachoprstore.list.filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
@@ -124,7 +132,7 @@ export class DespachosPrPage implements OnInit {
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, searchedList)
|
||||
} else {
|
||||
|
||||
|
||||
const list = this.TaskService.despachoprstore.list
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
@@ -144,7 +152,7 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
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();
|
||||
this.despachoList = [];
|
||||
this.skeletonLoader = false;
|
||||
|
||||
|
||||
|
||||
let despachosPr;
|
||||
let despachos = this.sortService.sortArrayByDate(result);
|
||||
|
||||
if(SessionStore.user.Profile != "PR") {
|
||||
|
||||
|
||||
|
||||
|
||||
if(SessionStore.user.Profile != 'Consultant') {
|
||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
||||
} else {
|
||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Gerar Diploma" || data.activityInstanceName == "Retificar Diploma");
|
||||
}
|
||||
|
||||
|
||||
} else if (SessionStore.user.Profile == "PR") {
|
||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
|
||||
}
|
||||
|
||||
|
||||
|
||||
despachosPr = despachosPr.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
|
||||
despachosPr.forEach((element, index) => {
|
||||
@@ -188,12 +196,12 @@ export class DespachosPrPage implements OnInit {
|
||||
this.despachoList.push(task);
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.despachoList = this.sortService.sortDate(this.despachoList, 'CreateDate')
|
||||
this.despachoprstore.reset(this.despachoList)
|
||||
|
||||
} catch(error) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.skeletonLoader = false
|
||||
@@ -217,7 +225,7 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber: any) {
|
||||
|
||||
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
@@ -235,9 +243,9 @@ export class DespachosPrPage implements OnInit {
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
|
||||
modal.onDidDismiss().then((res) => {
|
||||
|
||||
|
||||
this.LoadList();
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
</button>
|
||||
</div>
|
||||
<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>
|
||||
</ion-header>
|
||||
@@ -143,4 +144,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
:host{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
.header-2 {
|
||||
border-top-right-radius: 24px;
|
||||
border-top-left-radius: 24px;
|
||||
}
|
||||
|
||||
|
||||
ion-content, .header-2, .main-content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
.main-content {
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
|
||||
|
||||
.title{
|
||||
font-family: Roboto;
|
||||
font-size: rem(25);
|
||||
@@ -42,7 +42,7 @@
|
||||
.bottom-text{
|
||||
font-size: rem(15) !important;
|
||||
font-family: Roboto !important;
|
||||
color: #0d89d1 !important;
|
||||
color: black !important;
|
||||
}
|
||||
}
|
||||
.item-list-small{
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
.ion-item-class{
|
||||
padding: 0;
|
||||
|
||||
|
||||
}
|
||||
.label-text{
|
||||
width: 100%;
|
||||
@@ -97,7 +97,7 @@ ion-item{
|
||||
.div-icon ion-icon{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
||||
|
||||
}
|
||||
.div-content-expediente p, .div-content-pendentes p{
|
||||
font-size: rem(19);
|
||||
@@ -176,7 +176,7 @@ ion-item{
|
||||
.exp-workflow{
|
||||
float: left;
|
||||
margin: 0 !important;
|
||||
|
||||
|
||||
.label{
|
||||
border-radius: 15px;
|
||||
background: var(--label-bg-color);
|
||||
@@ -239,4 +239,5 @@ ion-item{
|
||||
font-size: rem(45);
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { DeplomasStore } from 'src/app/store/deplomas.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diplomas-assinar',
|
||||
@@ -37,7 +38,8 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
private router: Router,
|
||||
public ThemeService: ThemeService,
|
||||
public TaskService: TaskService,
|
||||
private RouteService: RouteService,) {
|
||||
private RouteService: RouteService,
|
||||
public p: PermissionService,) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -69,7 +71,7 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
|
||||
const list = this.TaskService.despachoStore.list.filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user