react-weekly-planning 1.0.26 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -9
- package/lib/utils.js +3 -3
- package/lib/utils.ts +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -223,20 +223,13 @@ export const getSavedTasks = () => {
|
|
|
223
223
|
return [];
|
|
224
224
|
}
|
|
225
225
|
const tasksTable = JSON.parse(taskSavedString);
|
|
226
|
-
const
|
|
227
|
-
.filter((task) => {
|
|
228
|
-
if (task === null || task === void 0 ? void 0 : task.taskExpiryDate) {
|
|
229
|
-
const taskDate = new Date(task === null || task === void 0 ? void 0 : task.taskExpiryDate);
|
|
230
|
-
return taskDate.getTime() >= Date.now();
|
|
231
|
-
}
|
|
232
|
-
})
|
|
233
|
-
.map((task) => {
|
|
226
|
+
const savedTasks = tasksTable.map((task) => {
|
|
234
227
|
const { taskDate, taskExpiryDate } = task, rest = __rest(task, ["taskDate", "taskExpiryDate"]);
|
|
235
228
|
if (taskExpiryDate) {
|
|
236
229
|
return Object.assign({ taskDate: new Date(taskDate), taskExpiryDate: new Date(taskExpiryDate) }, rest);
|
|
237
230
|
}
|
|
238
231
|
});
|
|
239
|
-
return
|
|
232
|
+
return savedTasks;
|
|
240
233
|
};
|
|
241
234
|
export const deleteTaskSaved = (taskId) => {
|
|
242
235
|
const tasksSavedString = window.localStorage.getItem("CalendarTaskSaved");
|
package/lib/utils.js
CHANGED
|
@@ -448,9 +448,9 @@ function getSessionStorageRecordForDragAndDrop(tasks, positionDay, dropGroupId)
|
|
|
448
448
|
return { taskDropStart, taskDropEnd, taskDropDate, newTask, newTasks };
|
|
449
449
|
}
|
|
450
450
|
function compareWeekOffset(calendarDate, weekOffset, taskDate) {
|
|
451
|
-
if (taskDate.getDay() === 0 && calculerEcartSemaine(taskDate) === -7) {
|
|
452
|
-
|
|
453
|
-
}
|
|
451
|
+
// if (taskDate.getDay() === 0 && calculerEcartSemaine(taskDate) === -7) {
|
|
452
|
+
// return true;
|
|
453
|
+
// }
|
|
454
454
|
if (calendarDate)
|
|
455
455
|
return (calculerEcartSemaine(calendarDate) === calculerEcartSemaine(taskDate));
|
|
456
456
|
return weekOffset === calculerEcartSemaine(taskDate);
|
package/lib/utils.ts
CHANGED
|
@@ -571,9 +571,9 @@ function compareWeekOffset(
|
|
|
571
571
|
weekOffset: number,
|
|
572
572
|
taskDate: Date
|
|
573
573
|
) {
|
|
574
|
-
if (taskDate.getDay() === 0 && calculerEcartSemaine(taskDate) === -7) {
|
|
575
|
-
|
|
576
|
-
}
|
|
574
|
+
// if (taskDate.getDay() === 0 && calculerEcartSemaine(taskDate) === -7) {
|
|
575
|
+
// return true;
|
|
576
|
+
// }
|
|
577
577
|
if (calendarDate)
|
|
578
578
|
return (
|
|
579
579
|
calculerEcartSemaine(calendarDate) === calculerEcartSemaine(taskDate)
|