4.20.2: Клик по целям-задачам в желаниях
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m42s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m42s
This commit is contained in:
@@ -10247,6 +10247,10 @@ func (a *App) getWishlistItemsWithConditions(userID int, includeCompleted bool)
|
||||
if taskName.Valid {
|
||||
condition.TaskName = &taskName.String
|
||||
}
|
||||
if taskID.Valid {
|
||||
taskIDVal := int(taskID.Int64)
|
||||
condition.TaskID = &taskIDVal
|
||||
}
|
||||
} else if scoreConditionID.Valid {
|
||||
condition.Type = "project_points"
|
||||
if projectName.Valid {
|
||||
@@ -11217,6 +11221,8 @@ func (a *App) getWishlistItemHandler(w http.ResponseWriter, r *http.Request) {
|
||||
condition.TaskName = &taskName.String
|
||||
}
|
||||
if taskID.Valid {
|
||||
taskIDVal := int(taskID.Int64)
|
||||
condition.TaskID = &taskIDVal
|
||||
var taskCompleted int
|
||||
err := a.DB.QueryRow(`SELECT completed FROM tasks WHERE id = $1 AND user_id = $2 AND deleted = FALSE`, taskID.Int64, conditionOwnerID).Scan(&taskCompleted)
|
||||
if err == nil {
|
||||
@@ -11594,6 +11600,8 @@ func (a *App) updateWishlistHandler(w http.ResponseWriter, r *http.Request) {
|
||||
condition.TaskName = &taskName.String
|
||||
}
|
||||
if taskID.Valid {
|
||||
taskIDVal := int(taskID.Int64)
|
||||
condition.TaskID = &taskIDVal
|
||||
var taskCompleted int
|
||||
err := a.DB.QueryRow(`SELECT completed FROM tasks WHERE id = $1 AND user_id = $2 AND deleted = FALSE`, taskID.Int64, conditionOwnerID).Scan(&taskCompleted)
|
||||
if err == nil {
|
||||
@@ -13654,6 +13662,8 @@ func (a *App) getWishlistItemsByBoard(boardID int, userID int) ([]WishlistItem,
|
||||
}
|
||||
// Проверяем выполнена ли задача для владельца условия
|
||||
if taskID.Valid {
|
||||
taskIDVal := int(taskID.Int64)
|
||||
condition.TaskID = &taskIDVal
|
||||
var taskCompleted int
|
||||
err := a.DB.QueryRow(`SELECT completed FROM tasks WHERE id = $1 AND user_id = $2 AND deleted = FALSE`, taskID.Int64, conditionOwnerID).Scan(&taskCompleted)
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user