This commit is contained in:
Peter Maquiran
2023-04-28 12:56:45 +01:00
parent 8d88b613cb
commit bd8b3c3501
17 changed files with 190 additions and 97 deletions
+7 -6
View File
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { momentG } from 'src/plugin/momentG';
@Injectable({
providedIn: 'root'
})
@@ -227,12 +227,13 @@ export class DeplomasService {
lessthen24Hours(isoDateString:string) {
const creationDate = new Date(isoDateString)
const creationDatePlus24h = new Date(creationDate)
creationDatePlus24h.setHours((creationDate.getHours() + 24))
const currentDate = new Date()
return creationDatePlus24h.getTime() > currentDate.getTime()
if(!isoDateString) {
return false
}
const creationDate = new Date(isoDateString)
return momentG(new Date(), 'dd MMMM yyyy') == momentG(new Date(creationDate), 'dd MMMM yyyy')
}
+7 -6
View File
@@ -3,7 +3,7 @@ import { localstoreService } from './localstore.service'
import { SHA1 } from 'crypto-js'
import { customTask } from '../models/dailyworktask.model';
import { ObjectQueryService } from '../services/object-query.service';
import { momentG } from 'src/plugin/momentG';
@Injectable({
providedIn: 'root'
})
@@ -161,12 +161,13 @@ export class DespachoStoreService {
lessthen24Hours(isoDateString:string) {
const creationDate = new Date(isoDateString)
const creationDatePlus24h = new Date(creationDate)
creationDatePlus24h.setHours((creationDate.getHours() + 24))
const currentDate = new Date()
return creationDatePlus24h.getTime() > currentDate.getTime()
if(!isoDateString) {
return false
}
const creationDate = new Date(isoDateString)
return momentG(new Date(), 'dd MMMM yyyy') == momentG(new Date(creationDate), 'dd MMMM yyyy')
}
+7 -5
View File
@@ -1,6 +1,7 @@
import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { momentG } from 'src/plugin/momentG';
@Injectable({
providedIn: 'root'
@@ -81,12 +82,13 @@ updateNewCount() {
lessthen24Hours(isoDateString:string) {
const creationDate = new Date(isoDateString)
const creationDatePlus24h = new Date(creationDate)
creationDatePlus24h.setHours((creationDate.getHours() + 24))
const currentDate = new Date()
return creationDatePlus24h.getTime() > currentDate.getTime()
if(!isoDateString) {
return false
}
const creationDate = new Date(isoDateString)
return momentG(new Date(), 'dd MMMM yyyy') == momentG(new Date(creationDate), 'dd MMMM yyyy')
}
}
@@ -3,6 +3,7 @@ import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { isArray } from 'ionic-angular/umd/util/util';
import { EventoApprovePipe } from 'src/app/pipes/evento-approve.pipe'
import { momentG } from 'src/plugin/momentG';
@Injectable({
providedIn: 'root'
@@ -133,12 +134,13 @@ export class EventoaprovacaoStoreService {
lessthen24Hours(isoDateString:string) {
const creationDate = new Date(isoDateString)
const creationDatePlus24h = new Date(creationDate)
creationDatePlus24h.setHours((creationDate.getHours() + 24))
const currentDate = new Date()
return creationDatePlus24h.getTime() > currentDate.getTime()
if(!isoDateString) {
return false
}
const creationDate = new Date(isoDateString)
return momentG(new Date(), 'dd MMMM yyyy') == momentG(new Date(creationDate), 'dd MMMM yyyy')
}
+7 -5
View File
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { SHA1 } from 'crypto-js'
import { ExpedienteTask } from '../models/dailyworktask.model';
import { momentG } from 'src/plugin/momentG';
@Injectable({
providedIn: 'root'
@@ -82,12 +83,13 @@ export class ExpedientegdStoreService {
lessthen24Hours(isoDateString:string) {
const creationDate = new Date(isoDateString)
const creationDatePlus24h = new Date(creationDate)
creationDatePlus24h.setHours((creationDate.getHours() + 24))
const currentDate = new Date()
return creationDatePlus24h.getTime() > currentDate.getTime()
if(!isoDateString) {
return false
}
const creationDate = new Date(isoDateString)
return momentG(new Date(), 'dd MMMM yyyy') == momentG(new Date(creationDate), 'dd MMMM yyyy')
}
}
+7 -5
View File
@@ -1,6 +1,7 @@
import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { momentG } from 'src/plugin/momentG';
@Injectable({
providedIn: 'root'
@@ -136,12 +137,13 @@ export class PedidosStoreService {
lessthen24Hours(isoDateString:string) {
const creationDate = new Date(isoDateString)
const creationDatePlus24h = new Date(creationDate)
creationDatePlus24h.setHours((creationDate.getHours() + 24))
const currentDate = new Date()
return creationDatePlus24h.getTime() > currentDate.getTime()
if(!isoDateString) {
return false
}
const creationDate = new Date(isoDateString)
return momentG(new Date(), 'dd MMMM yyyy') == momentG(new Date(creationDate), 'dd MMMM yyyy')
}
+8 -6
View File
@@ -1,6 +1,7 @@
import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { momentG } from 'src/plugin/momentG';
@Injectable({
providedIn: 'root'
@@ -68,7 +69,7 @@ export class PendestesStoreService {
}
private save() {
setTimeout(()=>{
setTimeout(() => {
localstoreService.set(this.keyName,{
list: this._list,
count: this._list.length
@@ -88,12 +89,13 @@ export class PendestesStoreService {
lessthen24Hours(isoDateString:string) {
const creationDate = new Date(isoDateString)
const creationDatePlus24h = new Date(creationDate)
creationDatePlus24h.setHours((creationDate.getHours() + 24))
const currentDate = new Date()
return creationDatePlus24h.getTime() > currentDate.getTime()
if(!isoDateString) {
return false
}
const creationDate = new Date(isoDateString)
return momentG(new Date(), 'dd MMMM yyyy') == momentG(new Date(creationDate), 'dd MMMM yyyy')
}
}