mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
remove all date
This commit is contained in:
@@ -226,6 +226,7 @@ export class NewEventPage implements OnInit {
|
|||||||
_date .setMinutes(minutes + 15)
|
_date .setMinutes(minutes + 15)
|
||||||
return _date
|
return _date
|
||||||
}
|
}
|
||||||
|
|
||||||
setStartDate() {
|
setStartDate() {
|
||||||
if(!this.postEvent.StartDate) {
|
if(!this.postEvent.StartDate) {
|
||||||
this.postEvent.StartDate = this.roundTimeQuarterHour();
|
this.postEvent.StartDate = this.roundTimeQuarterHour();
|
||||||
|
|||||||
@@ -10,6 +10,21 @@ import { SearchPage } from './search.page';
|
|||||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||||
/* */
|
/* */
|
||||||
/* import { TagCloudModule } from 'angular-tag-cloud-module'; */
|
/* import { TagCloudModule } from 'angular-tag-cloud-module'; */
|
||||||
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||||
|
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({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -20,6 +35,16 @@ import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-
|
|||||||
/* */
|
/* */
|
||||||
SearchPageRoutingModule,
|
SearchPageRoutingModule,
|
||||||
BtnModalDismissPageModule,
|
BtnModalDismissPageModule,
|
||||||
|
NgxMatDatetimePickerModule,
|
||||||
|
NgxMatNativeDateModule,
|
||||||
|
NgxMatTimepickerModule,
|
||||||
|
NgxMatMomentModule,
|
||||||
|
MatDatepickerModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatNativeDateModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatButtonModule,
|
||||||
|
MatSelectModule
|
||||||
],
|
],
|
||||||
declarations: [SearchPage],
|
declarations: [SearchPage],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
|
|||||||
@@ -59,18 +59,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-form>
|
</ion-form>
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<li *ngIf="showAdvanceSearch" class="d-flex date-container ion-justify-content-between">
|
<li *ngIf="showAdvanceSearch" class="d-flex date-container ion-justify-content-between">
|
||||||
<div class="icon-mer icon">
|
<div class="icon-mer icon">
|
||||||
<ion-icon name="restaurant-outline" src="assets/images/icons-advance-search-document.svg"></ion-icon>
|
<ion-icon name="restaurant-outline" src="assets/images/icons-advance-search-document.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container d-flex ion-align-items-">
|
<div class="input-container d-flex flex-grow-1 justify-center align-center materia-top">
|
||||||
<ion-datetime class="cursor-pointer" [(ngModel)]='searchDocumentDate' placeholder="Data" display-timezone="utc"></ion-datetime>
|
|
||||||
|
<mat-form-field appearance="none" class="date-hour-picker" (click)="clickDate()" style="
|
||||||
|
margin-top: -11px;
|
||||||
|
margin-left: 10px;
|
||||||
|
">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
|
placeholder="Data Inicio*"
|
||||||
|
[(ngModel)]="searchDocumentDate"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="clickDate()" ></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #picker1 (click)="clickDate()"
|
||||||
|
[showSpinners]="showSpinners"
|
||||||
|
[showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
|
[stepSecond]="stepSecond"
|
||||||
|
[touchUi]="touchUi"
|
||||||
|
>
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
<div class="icon cursor-pointer" (click)="clearInputDocumentDate()">
|
<div class="icon cursor-pointer" (click)="clearInputDocumentDate()">
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<!-- Sender -->
|
<!-- Sender -->
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ModalController, NavParams } from '@ionic/angular';
|
import { ModalController, NavParams } from '@ionic/angular';
|
||||||
import { SearchService } from "../../services/search.service";
|
import { SearchService } from "../../services/search.service";
|
||||||
import { formatDate } from '@angular/common';
|
import { formatDate } from '@angular/common';
|
||||||
@@ -14,14 +14,40 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||||
|
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
|
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||||
|
|
||||||
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
|
parse: {
|
||||||
|
dateInput: "YYYY-MMMM-DD HH:mm"
|
||||||
|
},
|
||||||
|
display: {
|
||||||
|
dateInput: "DD MMM YYYY H:mm",
|
||||||
|
monthYearLabel: "MMM YYYY",
|
||||||
|
dateA11yLabel: "LL",
|
||||||
|
monthYearA11yLabel: "MMMM YYYY"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-search',
|
selector: 'app-search',
|
||||||
templateUrl: './search.page.html',
|
templateUrl: './search.page.html',
|
||||||
styleUrls: ['./search.page.scss'],
|
styleUrls: ['./search.page.scss'],
|
||||||
|
providers: [
|
||||||
|
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
|
||||||
|
]
|
||||||
})
|
})
|
||||||
export class SearchPage implements OnInit {
|
export class SearchPage implements OnInit {
|
||||||
|
|
||||||
|
public showSpinners = true;
|
||||||
|
public showSeconds = false;
|
||||||
|
public touchUi = false;
|
||||||
|
public enableMeridian = false;
|
||||||
|
public stepHour = 1;
|
||||||
|
public stepMinute = 15;
|
||||||
|
public stepSecond = 15;
|
||||||
|
//
|
||||||
|
|
||||||
// https params
|
// https params
|
||||||
searchSubject: string;
|
searchSubject: string;
|
||||||
searchDocumentDate: string;
|
searchDocumentDate: string;
|
||||||
@@ -61,6 +87,9 @@ export class SearchPage implements OnInit {
|
|||||||
|
|
||||||
showSearchInput = false
|
showSearchInput = false
|
||||||
|
|
||||||
|
|
||||||
|
@ViewChild('picker1') picker1: any;
|
||||||
|
|
||||||
constructor(private modalController: ModalController,
|
constructor(private modalController: ModalController,
|
||||||
private search: SearchService,
|
private search: SearchService,
|
||||||
private modalCtrl: ModalController,
|
private modalCtrl: ModalController,
|
||||||
@@ -213,6 +242,38 @@ export class SearchPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
roundTimeQuarterHour(timeToReturn = new Date()) {
|
||||||
|
let date: any = new Date(timeToReturn) || new Date();
|
||||||
|
const minutes = date.getMinutes();
|
||||||
|
date.setSeconds(0);
|
||||||
|
|
||||||
|
if(minutes % 15 != 0) {
|
||||||
|
|
||||||
|
if (minutes > 45) {
|
||||||
|
date.setMinutes(60)
|
||||||
|
} else if (minutes > 30) {
|
||||||
|
date.setMinutes(45)
|
||||||
|
} else if (minutes > 15) {
|
||||||
|
date.setMinutes(30)
|
||||||
|
} else if (minutes > 0) {
|
||||||
|
date.setMinutes(15)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return date
|
||||||
|
}
|
||||||
|
|
||||||
|
clickDate() {
|
||||||
|
if(!this.searchDocumentDate) {
|
||||||
|
this.searchDocumentDate = this.roundTimeQuarterHour()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clearInputDocumentDate() {
|
||||||
|
this.searchDocumentDate = "";
|
||||||
|
}
|
||||||
|
|
||||||
loadWordCloud() {
|
loadWordCloud() {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -720,9 +781,7 @@ export class SearchPage implements OnInit {
|
|||||||
this.searchSender = "";
|
this.searchSender = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
clearInputDocumentDate(){
|
|
||||||
this.searchDocumentDate = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
clearInputOrganicEntity(){
|
clearInputOrganicEntity(){
|
||||||
this.searchOrganicEntiry = "";
|
this.searchOrganicEntiry = "";
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "79509a305",
|
"shortSHA": "9253c33f0",
|
||||||
"SHA": "79509a305538f7ae6e4d0327e3a314fe37954f3e",
|
"SHA": "9253c33f08f05215aa3d2fc84b8b48f6df66f312",
|
||||||
"branch": "no_bug_movemente",
|
"branch": "no_bug_movemente",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Thu Mar 9 12:22:54 2023 +0100'",
|
"lastCommitTime": "'Thu Mar 9 12:56:11 2023 +0100'",
|
||||||
"lastCommitMessage": "merge",
|
"lastCommitMessage": "fix gabinete",
|
||||||
"lastCommitNumber": "4852",
|
"lastCommitNumber": "4853",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.ts",
|
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/agenda/new-event/new-event.page.ts\n\tmodified: src/app/pages/search/search.module.ts\n\tmodified: src/app/pages/search/search.page.html\n\tmodified: src/app/pages/search/search.page.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user