feat(api): update daily task details endpoint to use new URL

This commit is contained in:
Vaibhav Surve 2025-07-10 11:16:15 +05:30
parent 1e1bcc3aa4
commit 71f9e54d58
2 changed files with 32 additions and 29 deletions

View File

@ -25,7 +25,7 @@ class ApiEndpoints {
static const String getDailyTask = "/task/list"; static const String getDailyTask = "/task/list";
static const String reportTask = "/task/report"; static const String reportTask = "/task/report";
static const String commentTask = "/task/comment"; static const String commentTask = "/task/comment";
static const String dailyTaskDetails = "/project/details"; static const String dailyTaskDetails = "/project/details-old";
static const String assignDailyTask = "/task/assign"; static const String assignDailyTask = "/task/assign";
static const String getWorkStatus = "/master/work-status"; static const String getWorkStatus = "/master/work-status";
static const String approveReportAction = "/task/approve"; static const String approveReportAction = "/task/approve";

View File

@ -87,7 +87,7 @@ class _DailyProgressReportScreenState extends State<DailyProgressReportScreen>
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
MyText.titleLarge( MyText.titleLarge(
'Daily Task Progress', 'Daily Task Progress',
@ -461,41 +461,44 @@ class _DailyProgressReportScreenState extends State<DailyProgressReportScreen>
: Colors.red[700], : Colors.red[700],
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Row( SingleChildScrollView(
mainAxisAlignment: MainAxisAlignment.end, scrollDirection: Axis.horizontal,
children: [ child: Row(
if (task.reportedDate == null || mainAxisAlignment: MainAxisAlignment.end,
task.reportedDate children: [
.toString() if (task.reportedDate == null ||
.isEmpty) ...[ task.reportedDate
TaskActionButtons.reportButton( .toString()
context: context, .isEmpty) ...[
task: task, TaskActionButtons.reportButton(
completed: completed.toInt(), context: context,
refreshCallback: _refreshData, task: task,
), completed: completed.toInt(),
const SizedBox(width: 8), refreshCallback: _refreshData,
] else if (task.approvedBy == null) ...[ ),
TaskActionButtons.reportActionButton( const SizedBox(width: 4),
] else if (task.approvedBy == null) ...[
TaskActionButtons.reportActionButton(
context: context,
task: task,
parentTaskID: parentTaskID,
workAreaId: workAreaId.toString(),
activityId: activityId.toString(),
completed: completed.toInt(),
refreshCallback: _refreshData,
),
const SizedBox(width: 5),
],
TaskActionButtons.commentButton(
context: context, context: context,
task: task, task: task,
parentTaskID: parentTaskID, parentTaskID: parentTaskID,
workAreaId: workAreaId.toString(), workAreaId: workAreaId.toString(),
activityId: activityId.toString(), activityId: activityId.toString(),
completed: completed.toInt(),
refreshCallback: _refreshData, refreshCallback: _refreshData,
), ),
const SizedBox(width: 8),
], ],
TaskActionButtons.commentButton( ),
context: context,
task: task,
parentTaskID: parentTaskID,
workAreaId: workAreaId.toString(),
activityId: activityId.toString(),
refreshCallback: _refreshData,
),
],
) )
], ],
), ),