Added CDate component !

This commit is contained in:
Paolo Arena
2019-04-05 16:16:29 +02:00
parent fe600f40a6
commit 7a55fa7f68
26 changed files with 421 additions and 40910 deletions

View File

@@ -27,7 +27,7 @@ const state: ITodosState = {
visuLastCompleted: 10
}
const fieldtochange: string [] = ['descr', 'status', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress']
const fieldtochange: string [] = ['descr', 'status', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress', 'phase', 'assigned_to_userId', 'hoursplanned', 'hoursworked', 'start_date', 'completed_at']
const b = storeBuilder.module<ITodosState>('Todos', state)
const stateGetter = b.state()
@@ -56,26 +56,32 @@ function initcat() {
namespace Getters {
const getRecordEmpty = b.read((state: ITodosState) => (): ITodo => {
const tomorrow = new Date()
const tomorrow = tools.getDateNow()
tomorrow.setDate(tomorrow.getDate() + 1)
const objtodo: ITodo = {
// _id: new Date().toISOString(), // Create NEW
// _id: tools.getDateNow().toISOString(), // Create NEW
_id: objectId(),
userId: UserStore.state.userId,
descr: '',
priority: tools.Priority.PRIORITY_NORMAL,
status: tools.Status.OPENED,
created_at: new Date(),
modify_at: new Date(),
completed_at: new Date(),
created_at: tools.getDateNow(),
modify_at: tools.getDateNow(),
completed_at: tools.getDateNull(),
category: '',
expiring_at: tomorrow,
enableExpiring: false,
id_prev: '',
pos: 0,
modified: false,
progress: 0
progress: 0,
progressCalc: 0,
phase: 0,
assigned_to_userId: '',
hoursplanned: 0,
hoursworked: 0,
start_date: tools.getDateNull(),
}
// return this.copy(objtodo)
return objtodo