#79 fixing bug
This commit is contained in:
parent
b4c11a7f90
commit
7ce8b20841
@ -130,12 +130,15 @@ public class TaskService {
|
|||||||
return newTask;
|
return newTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
public void generateYearTasks() {
|
public void generateYearTasks() {
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
cal.setTime(new Date());
|
cal.setTime(new Date());
|
||||||
List<Task> tasks = taskRepository.findToGenerate(cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.YEAR));
|
List<Task> tasks = taskRepository.findToGenerate(cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.YEAR) - 1);
|
||||||
System.out.println(cal.get(Calendar.DAY_OF_MONTH) + " " + cal.get(Calendar.MONTH));
|
tasks.forEach(task -> {
|
||||||
tasks.forEach(task -> taskRepository.save(copyYearTask(task)));
|
Task newTask = copyYearTask(task);
|
||||||
|
taskRepository.save(newTask);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Task.TaskStatus> getTaskStatuses() {
|
public List<Task.TaskStatus> getTaskStatuses() {
|
||||||
|
@ -21,6 +21,14 @@ $(document).ready(function () {
|
|||||||
$("#input-tag").keyup(function (event) {
|
$("#input-tag").keyup(function (event) {
|
||||||
if(event.keyCode == 13 || event.keyCode == 188) {
|
if(event.keyCode == 13 || event.keyCode == 188) {
|
||||||
var tagNumber = $("#tags .tag").length;
|
var tagNumber = $("#tags .tag").length;
|
||||||
|
if(length != 0) {
|
||||||
|
tagNumber = $("#tags .tag").last()
|
||||||
|
.children('input')
|
||||||
|
.attr("name")
|
||||||
|
.split(']')[0]
|
||||||
|
.split('[')[1];
|
||||||
|
tagNumber++;
|
||||||
|
}
|
||||||
var tagName = $.trim($(this).val());
|
var tagName = $.trim($(this).val());
|
||||||
var addTag = true;
|
var addTag = true;
|
||||||
// проверка, добавлен ли этот тег
|
// проверка, добавлен ли этот тег
|
||||||
|
Loading…
Reference in New Issue
Block a user