4.20.3: Дата next_show_at в целях-задачах
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m37s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m37s
This commit is contained in:
@@ -431,6 +431,7 @@ type UnlockConditionDisplay struct {
|
||||
Type string `json:"type"`
|
||||
TaskID *int `json:"task_id,omitempty"` // ID задачи (для task_completion)
|
||||
TaskName *string `json:"task_name,omitempty"`
|
||||
TaskNextShowAt *string `json:"task_next_show_at,omitempty"` // Дата следующего показа задачи (для task_completion)
|
||||
ProjectID *int `json:"project_id,omitempty"` // ID проекта (для project_points)
|
||||
ProjectName *string `json:"project_name,omitempty"`
|
||||
RequiredPoints *float64 `json:"required_points,omitempty"`
|
||||
@@ -11096,6 +11097,7 @@ func (a *App) getWishlistItemHandler(w http.ResponseWriter, r *http.Request) {
|
||||
wc.user_id AS condition_user_id,
|
||||
tc.task_id,
|
||||
t.name AS task_name,
|
||||
t.next_show_at AS task_next_show_at,
|
||||
sc.project_id,
|
||||
p.name AS project_name,
|
||||
sc.required_points,
|
||||
@@ -11137,6 +11139,7 @@ func (a *App) getWishlistItemHandler(w http.ResponseWriter, r *http.Request) {
|
||||
var conditionUserID sql.NullInt64
|
||||
var taskID sql.NullInt64
|
||||
var taskName sql.NullString
|
||||
var taskNextShowAt sql.NullTime
|
||||
var projectID sql.NullInt64
|
||||
var projectName sql.NullString
|
||||
var requiredPoints sql.NullFloat64
|
||||
@@ -11145,7 +11148,7 @@ func (a *App) getWishlistItemHandler(w http.ResponseWriter, r *http.Request) {
|
||||
err := rows.Scan(
|
||||
&itemID, &name, &price, &imagePath, &link, &completed, &itemProjectID, &itemProjectName,
|
||||
&conditionID, &displayOrder, &taskConditionID, &scoreConditionID, &conditionUserID,
|
||||
&taskID, &taskName, &projectID, &projectName, &requiredPoints, &startDate,
|
||||
&taskID, &taskName, &taskNextShowAt, &projectID, &projectName, &requiredPoints, &startDate,
|
||||
)
|
||||
if err != nil {
|
||||
log.Printf("Error scanning wishlist item: %v", err)
|
||||
@@ -11230,6 +11233,10 @@ func (a *App) getWishlistItemHandler(w http.ResponseWriter, r *http.Request) {
|
||||
condition.TaskCompleted = &isCompleted
|
||||
}
|
||||
}
|
||||
if taskNextShowAt.Valid {
|
||||
nextShowAtStr := taskNextShowAt.Time.Format(time.RFC3339)
|
||||
condition.TaskNextShowAt = &nextShowAtStr
|
||||
}
|
||||
} else if scoreConditionID.Valid {
|
||||
condition.Type = "project_points"
|
||||
if projectName.Valid {
|
||||
|
||||
Reference in New Issue
Block a user