Fix push notifications and hide action button on completed tasks
- Add push_certs directory to Dockerfile for APNs support - Fix notification_id conversion using strconv.FormatUint instead of string(rune()) - Remove "view" from completed tasks button_types so action button is hidden 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -126,6 +126,9 @@ COPY --from=builder /app/static /app/static
|
|||||||
COPY --from=builder /app/migrations /app/migrations
|
COPY --from=builder /app/migrations /app/migrations
|
||||||
COPY --from=builder /app/seeds /app/seeds
|
COPY --from=builder /app/seeds /app/seeds
|
||||||
|
|
||||||
|
# Copy push notification certificates
|
||||||
|
COPY --from=builder /app/push_certs /app/push_certs
|
||||||
|
|
||||||
# Copy admin panel standalone build (Next.js recommended layout)
|
# Copy admin panel standalone build (Next.js recommended layout)
|
||||||
COPY --from=admin-builder /app/.next/standalone/ /app/
|
COPY --from=admin-builder /app/.next/standalone/ /app/
|
||||||
COPY --from=admin-builder /app/public /app/public
|
COPY --from=admin-builder /app/public /app/public
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ func (r *TaskRepository) GetKanbanData(residenceID uint, daysThreshold int) (*mo
|
|||||||
{
|
{
|
||||||
Name: "completed_tasks",
|
Name: "completed_tasks",
|
||||||
DisplayName: "Completed",
|
DisplayName: "Completed",
|
||||||
ButtonTypes: []string{"view"},
|
ButtonTypes: []string{},
|
||||||
Icons: map[string]string{"ios": "checkmark.circle", "android": "CheckCircle"},
|
Icons: map[string]string{"ios": "checkmark.circle", "android": "CheckCircle"},
|
||||||
Color: "#34C759",
|
Color: "#34C759",
|
||||||
Tasks: completed,
|
Tasks: completed,
|
||||||
@@ -360,7 +360,7 @@ func (r *TaskRepository) GetKanbanDataForMultipleResidences(residenceIDs []uint,
|
|||||||
{
|
{
|
||||||
Name: "completed_tasks",
|
Name: "completed_tasks",
|
||||||
DisplayName: "Completed",
|
DisplayName: "Completed",
|
||||||
ButtonTypes: []string{"view"},
|
ButtonTypes: []string{},
|
||||||
Icons: map[string]string{"ios": "checkmark.circle", "android": "CheckCircle"},
|
Icons: map[string]string{"ios": "checkmark.circle", "android": "CheckCircle"},
|
||||||
Color: "#34C759",
|
Color: "#34C759",
|
||||||
Tasks: completed,
|
Tasks: completed,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
@@ -120,7 +121,7 @@ func (s *NotificationService) CreateAndSendNotification(ctx context.Context, use
|
|||||||
pushData[k] = string(jsonVal)
|
pushData[k] = string(jsonVal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pushData["notification_id"] = string(rune(notification.ID))
|
pushData["notification_id"] = strconv.FormatUint(uint64(notification.ID), 10)
|
||||||
|
|
||||||
// Send push notification
|
// Send push notification
|
||||||
if s.pushClient != nil {
|
if s.pushClient != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user