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