mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add new features
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { TaskListHeaderPage } from './task-list-header.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TaskListHeaderPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class TaskListHeaderPageRoutingModule {}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TaskListHeaderPageRoutingModule } from './task-list-header-routing.module';
|
||||
|
||||
import { TaskListHeaderPage } from './task-list-header.page';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
TaskListHeaderPageRoutingModule,
|
||||
//
|
||||
MatSelectModule,
|
||||
BtnModalDismissPageModule
|
||||
],
|
||||
declarations: [TaskListHeaderPage],
|
||||
exports: [TaskListHeaderPage]
|
||||
})
|
||||
export class TaskListHeaderPageModule {}
|
||||
@@ -0,0 +1,92 @@
|
||||
<div>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="loading && loaderTop"></ion-progress-bar>
|
||||
<div class="px-20 pt-30 d-flex justify-space-between">
|
||||
<div class="d-flex align-center pointer">
|
||||
<div class="font-35 d-flex" *ngIf="goBackButton" (click)="goBack.emit()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<ion-label class="font-25" >{{ headerName }}</ion-label>
|
||||
</div>
|
||||
<div class="d-flex align-center ">
|
||||
|
||||
<!-- <div>
|
||||
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
|
||||
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src='assets/images/icons-search.svg'></ion-icon>
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src='assets/images/theme/gov/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<button title="Fechar" class="btn-no-color d-flex" (click)="closeSearch();showSearch=false;searchSubject=''" *ngIf="showSearch">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-35" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<div *ngIf="showSearch">
|
||||
<div class="d-flex search-input-container ml-10 justify-between" *ngIf="showSearch">
|
||||
<div class="input-text d-flex ion-align-items-center">
|
||||
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' (ngModelChange)="dynamicSearch()"
|
||||
class="search-input text-black" type="search" placeholder="Pesquisar"></ion-input>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<div class="d-flex" (click)="reorderList.emit('old')" *ngIf="ordinance == 'recent' ">
|
||||
|
||||
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
|
||||
</div>
|
||||
|
||||
<div class="d-flex" (click)="reorderList.emit('recent')" *ngIf="ordinance != 'recent' ">
|
||||
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName" (valueChange)="changeFilterName.emit(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>
|
||||
</div>
|
||||
|
||||
<!-- <button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<ion-progress-bar class="px-20" type="indeterminate" *ngIf="loading && loaderBottom"></ion-progress-bar>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
.main-header{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
overflow: auto;
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
|
||||
.thetitle{
|
||||
width: fit-content;
|
||||
float: left;
|
||||
}
|
||||
.theicon{
|
||||
width: fit-content;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TaskListHeaderPage } from './task-list-header.page';
|
||||
|
||||
describe('TaskListHeaderPage', () => {
|
||||
let component: TaskListHeaderPage;
|
||||
let fixture: ComponentFixture<TaskListHeaderPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TaskListHeaderPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TaskListHeaderPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-list-header',
|
||||
templateUrl: './task-list-header.page.html',
|
||||
styleUrls: ['./task-list-header.page.scss'],
|
||||
})
|
||||
export class TaskListHeaderPage implements OnInit {
|
||||
|
||||
@Input() headerName = 'name'
|
||||
@Input() goBackButton = false
|
||||
@Input() loading = true
|
||||
@Input() loaderTop = false;
|
||||
@Input() loaderBottom = false;
|
||||
@Output() goBack = new EventEmitter<any>();
|
||||
@Output() reorderList = new EventEmitter<any>();
|
||||
@Output() changeFilterName = new EventEmitter<any>();
|
||||
|
||||
environment = environment
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
@Input() ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
public ThemeService: ThemeService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<ion-content>
|
||||
<div class="overflow-y-auto height-100 width-100 px-20">
|
||||
<div class="overflow-y-auto height-100 width-100 px-20 d-flex task-list-com">
|
||||
|
||||
<div *ngIf="taskList.length >= 0">
|
||||
<ion-list part="divo">
|
||||
<div *ngIf="taskList.length >= 1" class="width-100">
|
||||
<ion-list part="divo" class="width-100">
|
||||
<div
|
||||
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of taskList; let i = index"
|
||||
@@ -43,12 +43,12 @@
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && taskList.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
class="empty-list d-flex height-100 width-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && taskList.length == 0">
|
||||
<div class="width-100" *ngIf="skeletonLoader && taskList.length == 0">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
|
||||
@@ -18,9 +18,7 @@ export class TaskListPage implements OnInit {
|
||||
constructor(
|
||||
public ThemeService: ThemeService,
|
||||
public TaskService: TaskService
|
||||
) {
|
||||
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { TaskListtHeaderPage } from './task-listt-header.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TaskListtHeaderPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class TaskListtHeaderPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TaskListtHeaderPageRoutingModule } from './task-listt-header-routing.module';
|
||||
|
||||
import { TaskListtHeaderPage } from './task-listt-header.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
TaskListtHeaderPageRoutingModule
|
||||
],
|
||||
declarations: [TaskListtHeaderPage]
|
||||
})
|
||||
export class TaskListtHeaderPageModule {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>taskListtHeader</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
</ion-content>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TaskListtHeaderPage } from './task-listt-header.page';
|
||||
|
||||
describe('TaskListtHeaderPage', () => {
|
||||
let component: TaskListtHeaderPage;
|
||||
let fixture: ComponentFixture<TaskListtHeaderPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TaskListtHeaderPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TaskListtHeaderPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-listt-header',
|
||||
templateUrl: './task-listt-header.page.html',
|
||||
styleUrls: ['./task-listt-header.page.scss'],
|
||||
})
|
||||
export class TaskListtHeaderPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user