42 lines
1 KiB
Dart
42 lines
1 KiB
Dart
import "package:bus_running_record/models/channels/operations_channel.dart";
|
|
import "package:go_router/go_router.dart";
|
|
import "package:shadcn_flutter/shadcn_flutter.dart";
|
|
|
|
class OperationsChannelView extends StatelessWidget {
|
|
const OperationsChannelView({required this.channel, super.key});
|
|
|
|
final OperationsChannel channel;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
final isScheduleUploaded = channel.id.isEmpty;
|
|
|
|
if (!isScheduleUploaded) {
|
|
return Center(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Text(
|
|
"No schedule uploaded yet.",
|
|
).h4,
|
|
|
|
Gap(8),
|
|
|
|
Button.secondary(
|
|
child: Text(
|
|
"Upload Schedule",
|
|
),
|
|
onPressed: () {
|
|
context.go(
|
|
"/channel/${channel.organizationId}/${channel.id}/upload",
|
|
);
|
|
},
|
|
)
|
|
],
|
|
)
|
|
);
|
|
}
|
|
return const SizedBox.expand();
|
|
}
|
|
}
|