wire ticket status buttons to pql ticket status
Status buttons in the detail view now call pql.tickets.status IPC, publish a changed event to refresh the sidebar list, and reload the detail. Disabled for the current status. IPC handler accepts ids as a list for batch transitions. PqlClient.ticketSetStatus takes List<String> and joins with comma per pql CLI contract. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -153,9 +153,12 @@ class _StatusControls extends StatelessWidget {
|
||||
for (final s in _statuses) ...[
|
||||
Expanded(
|
||||
child: ClideTappable(
|
||||
onTap: () async {
|
||||
await controller.ipc.request('pql.tickets.status', args: {'ids': detail.id, 'status': s});
|
||||
await controller.load(detail.id);
|
||||
onTap: detail.status == s ? null : () async {
|
||||
final resp = await controller.ipc.request('pql.tickets.status', args: {'ids': [detail.id], 'status': s});
|
||||
if (resp.ok) {
|
||||
controller.messages.publish('builtin.tickets', 'changed', {'id': detail.id});
|
||||
await controller.load(detail.id);
|
||||
}
|
||||
},
|
||||
builder: (ctx, hovered, _) {
|
||||
final active = detail.status == s;
|
||||
|
||||
Reference in New Issue
Block a user