add search

This commit is contained in:
Peter Maquiran
2023-04-19 12:34:28 +01:00
parent 9c304e23d7
commit 15276dfc1a
16 changed files with 264 additions and 14 deletions
@@ -9,6 +9,21 @@ import { DespachosPrPageRoutingModule } from './despachos-pr-routing.module';
import { DespachosPrPage } from './despachos-pr.page';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
import { MatInputModule } from '@angular/material/input';
import { MatNativeDateModule } from '@angular/material/core';
import {
NgxMatDatetimePickerModule,
NgxMatNativeDateModule,
NgxMatTimepickerModule
} from '@angular-material-components/datetime-picker';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatSelectModule } from '@angular/material/select';
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
@NgModule({
imports: [
CommonModule,
@@ -17,6 +32,15 @@ import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-
DespachosPrPageRoutingModule,
BtnModalDismissPageModule,
//
MatInputModule,
MatNativeDateModule,
NgxMatDatetimePickerModule,
NgxMatTimepickerModule,
NgxMatNativeDateModule,
NgxMatMomentModule,
MatSelectModule,
MatButtonModule,
],
declarations: [DespachosPrPage]
})
@@ -9,6 +9,37 @@
<ion-label >{{environment.dispatchPR }}</ion-label>
</div>
<div class="theicon btn-refresh">
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
<mat-option value="Para hoje" >
Para hoje
</mat-option>
<mat-option value="Novos" >
Novos
</mat-option>
<mat-option value="Lidos" >
Lidos
</mat-option>
<mat-option value="Não lidos" >
Não lidos
</mat-option>
<mat-option value="OverdueTasks">
Em atraso
</mat-option>
<mat-option value="Todos" >
Todos
</mat-option>
</mat-select>
</mat-form-field>
<button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
@@ -33,12 +64,12 @@
<div >
<ion-list>
<div
class=" ion-no-padding ion-no-margin cursor-pointer"
class="ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of despachoprstore.list; let i = index"
(click)="goToDespachoPr(task.SerialNumber)"
>
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
<div class="item width-100 expedientes">
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
<div class="exp-top-detail">
<div class="subject d-flex align-center">
<ion-label [class.gb-seen]="TaskService.seen(task)">{{ task.Folio }}</ion-label>
@@ -58,7 +58,8 @@ export class DespachosPrPage implements OnInit {
customTaskPipe = new CustomTaskPipe()
SessionStore = SessionStore
environment = environment
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
constructor(
private processes: ProcessesService,
private modalController: ModalController,
@@ -9,6 +9,20 @@ import { DespachosPageRoutingModule } from './despachos-routing.module';
import { DespachosPage } from './despachos.page';
import { SharedModule } from 'src/app/shared/shared.module';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
//
import { MatInputModule } from '@angular/material/input';
import { MatNativeDateModule } from '@angular/material/core';
import {
NgxMatDatetimePickerModule,
NgxMatNativeDateModule,
NgxMatTimepickerModule
} from '@angular-material-components/datetime-picker';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatSelectModule } from '@angular/material/select';
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
@NgModule({
imports: [
@@ -18,6 +32,15 @@ import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-
DespachosPageRoutingModule,
BtnModalDismissPageModule,
//
MatInputModule,
MatNativeDateModule,
NgxMatDatetimePickerModule,
NgxMatTimepickerModule,
NgxMatNativeDateModule,
NgxMatMomentModule,
MatSelectModule,
MatButtonModule,
],
declarations: [
DespachosPage,
@@ -7,8 +7,41 @@
<div class="title d-flex align-center">
<app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss>
<div class="title"><ion-label >Despachos</ion-label></div>
<div class="title flex-1"><ion-label >Despachos</ion-label></div>
<div class="theicon btn-refresh">
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
<mat-option value="Para hoje" >
Para hoje
</mat-option>
<mat-option value="Novos" >
Novos
</mat-option>
<mat-option value="Lidos" >
Lidos
</mat-option>
<mat-option value="Não lidos" >
Não lidos
</mat-option>
<mat-option value="OverdueTasks">
Em atraso
</mat-option>
<mat-option value="Todos" >
Todos
</mat-option>
</mat-select>
</mat-form-field>
<button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
@@ -37,7 +70,7 @@
(click)="GoToDespacho(task.SerialNumber)"
>
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
<div class="item width-100 expediente">
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
<div class="exp-top-detail">
<div class="subject d-flex align-center">
<ion-label [class.gb-seen]="TaskService.seen(task)">{{ task.Folio }}</ion-label>
@@ -18,7 +18,8 @@ import { TaskService } from 'src/app/services/task.service'
export class DespachosPage implements OnInit {
despachoStore = DespachoStore;
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
constructor(
private router: Router,
private despachoRule: DespachoService,
@@ -52,7 +52,7 @@
</ion-refresher>
<app-task-list
[taskList] = despachoStore.list
[taskList] = TaskService.despachoStore.list
[skeletonLoader] = skeletonLoader
(viewTaskDetail)="goToDespacho($event)"
[filterName]="filterName"
@@ -3,6 +3,7 @@ import { customTask } from '../../../models/dailyworktask.model';
import { NavigationStart, Router } from '@angular/router';
import { DespachoStore } from 'src/app/store/despacho-store.service';
import { DespachoService } from 'src/app/Rules/despacho.service';
import { TaskService } from 'src/app/services/task.service'
@Component({
selector: 'app-despachos',
@@ -18,7 +19,8 @@ export class DespachosPage implements OnInit {
constructor (
private router: Router,
private despachoRule: DespachoService
private despachoRule: DespachoService,
public TaskService: TaskService
) {}
ngOnInit() {
@@ -34,6 +36,16 @@ export class DespachosPage implements OnInit {
}
}
});
this.TaskService.despachoStore.registerCallback({
id: import.meta.url,
funx:() => {
const filter = this.TaskService.despachoStore.list.filter(task => this.TaskService.filter(task, this.filterName))
}
})
}
goToDespacho({ SerialNumber } : customTask) {
+16
View File
@@ -29,6 +29,13 @@ export class DeplomasService {
diplomasGerarListNewCount = []
diplomasParaAssinarNewCount = []
callbacks: {
[key: string]: {
funx: Function
id: string
}
} = {}
constructor() {
this.keyNameDiplomasAssinado = (SHA1("DeplomasService"+"diplomasAssinado")).toString()
this.keyNameDiplomasReview = (SHA1("DeplomasService"+"diplomasReview")).toString()
@@ -58,6 +65,15 @@ export class DeplomasService {
}
registerCallback({funx, id}) {
this.callbacks[id] = { funx, id}
}
runCallback() {
for (const [key, value] of Object.entries(this.callbacks)) {
value.funx()
}
}
get deplomasReviewCount() {
return this._diplomasReviewCount
+18
View File
@@ -15,6 +15,13 @@ export class DespachoStoreService {
private keyName: string;
private _count = 0
callbacks: {
[key: string]: {
funx: Function
id: string
}
} = {}
ObjectQueryService = new ObjectQueryService()
newList = []
@@ -72,6 +79,17 @@ export class DespachoStoreService {
}
registerCallback({funx, id}) {
this.callbacks[id] = { funx, id}
}
runCallback() {
for (const [key, value] of Object.entries(this.callbacks)) {
value.funx()
}
}
Query() {
return {
Update: (select:Function, update:Function) => {
@@ -13,6 +13,13 @@ private _list = []
private keyName: string;
newList = [];
callbacks: {
[key: string]: {
funx: Function
id: string
}
} = {}
constructor() {
this.keyName = (SHA1("DespachosprStoreService")).toString()
@@ -25,6 +32,17 @@ constructor() {
}
registerCallback({funx, id}) {
this.callbacks[id] = { funx, id}
}
runCallback() {
for (const [key, value] of Object.entries(this.callbacks)) {
value.funx()
}
}
get list() {
return this._list || []
}
@@ -19,6 +19,13 @@ export class EventoaprovacaoStoreService {
private _countsAll = 0
callbacks: {
[key: string]: {
funx: Function
id: string
}
} = {}
newList = []
constructor() {
@@ -36,6 +43,18 @@ export class EventoaprovacaoStoreService {
}
registerCallback({funx, id}) {
this.callbacks[id] = { funx, id}
}
runCallback() {
for (const [key, value] of Object.entries(this.callbacks)) {
value.funx()
}
}
get countAll() {
return this._countsAll
}
@@ -16,6 +16,13 @@ export class ExpedientegdStoreService {
newList = []
callbacks: {
[key: string]: {
funx: Function
id: string
}
} = {}
constructor() {
this.keyName = (SHA1("EventoaprovacaoStoreService")).toString()
@@ -28,6 +35,17 @@ export class ExpedientegdStoreService {
}
registerCallback({funx, id}) {
this.callbacks[id] = { funx, id}
}
runCallback() {
for (const [key, value] of Object.entries(this.callbacks)) {
value.funx()
}
}
get list() {
return this._list
}
+18
View File
@@ -18,6 +18,13 @@ export class PedidosStoreService {
listParecerCount: Event[] = []
listDeferimentoCount: Event[] = []
callbacks: {
[key: string]: {
funx: Function
id: string
}
} = {}
constructor() {
@@ -36,6 +43,17 @@ export class PedidosStoreService {
}, 10)
}
registerCallback({funx, id}) {
this.callbacks[id] = { funx, id}
}
runCallback() {
for (const [key, value] of Object.entries(this.callbacks)) {
value.funx()
}
}
get listparecer(): any[] {
return this._listParecer || []
+18
View File
@@ -15,6 +15,13 @@ export class PendestesStoreService {
newList = []
callbacks: {
[key: string]: {
funx: Function
id: string
}
} = {}
constructor() {
this.keyName = (SHA1("PendestesStoreService")).toString()
@@ -28,6 +35,17 @@ export class PendestesStoreService {
}
registerCallback({funx, id}) {
this.callbacks[id] = { funx, id}
}
runCallback() {
for (const [key, value] of Object.entries(this.callbacks)) {
value.funx()
}
}
get list() {
return this._list
}
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = {
"shortSHA": "34acfed80",
"SHA": "34acfed80e82e6ba4b4d6e10b92186974ca7364d",
"shortSHA": "9c304e23d",
"SHA": "9c304e23d7f19029c7bb11093b1aea253abf4af3",
"branch": "feature/gabineteLabels",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Wed Apr 19 09:18:25 2023 +0100'",
"lastCommitMessage": "fix new task",
"lastCommitNumber": "4921",
"lastCommitTime": "'Wed Apr 19 09:35:47 2023 +0100'",
"lastCommitMessage": "another one",
"lastCommitNumber": "4922",
"change": "",
"changeStatus": "On branch feature/gabineteLabels\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.html",
"changeStatus": "On branch feature/gabineteLabels\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despachos-pr.module.ts\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.module.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.html\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/store/deplomas.service.ts\n\tmodified: src/app/store/despacho-store.service.ts\n\tmodified: src/app/store/despachospr-store.service.ts\n\tmodified: src/app/store/eventoaprovacao-store.service.ts\n\tmodified: src/app/store/expedientegd-store.service.ts\n\tmodified: src/app/store/pedidos-store.service.ts\n\tmodified: src/app/store/pendestes-store.service.ts",
"changeAuthor": "peter.maquiran"
}