Added Action Taken on Task
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||
@@ -389,6 +390,7 @@ class TasksController {
|
||||
String? requestedBy,
|
||||
String? notedBy,
|
||||
String? receivedBy,
|
||||
String? actionTaken,
|
||||
}) async {
|
||||
final payload = <String, dynamic>{};
|
||||
if (requestType != null) {
|
||||
@@ -410,6 +412,14 @@ class TasksController {
|
||||
if (receivedBy != null) {
|
||||
payload['received_by'] = receivedBy;
|
||||
}
|
||||
if (actionTaken != null) {
|
||||
try {
|
||||
payload['action_taken'] = jsonDecode(actionTaken);
|
||||
} catch (_) {
|
||||
// fallback: store raw string
|
||||
payload['action_taken'] = actionTaken;
|
||||
}
|
||||
}
|
||||
if (status != null) {
|
||||
payload['status'] = status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user