2022-08-30 06:09:09 +03:00
|
|
|
part of 'server_jobs_cubit.dart';
|
|
|
|
|
|
|
|
class ServerJobsState extends ServerInstallationDependendState {
|
2022-09-18 23:12:09 +03:00
|
|
|
ServerJobsState({
|
|
|
|
final serverJobList = const <ServerJob>[],
|
2022-09-18 17:05:41 +03:00
|
|
|
this.migrationJobUid,
|
2022-09-18 23:12:09 +03:00
|
|
|
}) {
|
|
|
|
_serverJobList = serverJobList;
|
|
|
|
}
|
|
|
|
|
|
|
|
late final List<ServerJob> _serverJobList;
|
2022-09-18 17:05:41 +03:00
|
|
|
final String? migrationJobUid;
|
2022-08-30 06:09:09 +03:00
|
|
|
|
2022-09-18 23:12:09 +03:00
|
|
|
List<ServerJob> get serverJobList =>
|
|
|
|
_serverJobList.where((final ServerJob job) => !job.isHidden).toList();
|
|
|
|
|
2022-08-30 06:09:09 +03:00
|
|
|
@override
|
2022-09-18 23:12:09 +03:00
|
|
|
List<Object?> get props => [migrationJobUid, ..._serverJobList];
|
2022-08-30 06:09:09 +03:00
|
|
|
|
|
|
|
ServerJobsState copyWith({
|
|
|
|
final List<ServerJob>? serverJobList,
|
2022-09-18 17:05:41 +03:00
|
|
|
final String? migrationJobUid,
|
2022-08-30 06:09:09 +03:00
|
|
|
}) =>
|
|
|
|
ServerJobsState(
|
2022-09-18 23:12:09 +03:00
|
|
|
serverJobList: serverJobList ?? _serverJobList,
|
2022-09-18 17:05:41 +03:00
|
|
|
migrationJobUid: migrationJobUid ?? this.migrationJobUid,
|
2022-08-30 06:09:09 +03:00
|
|
|
);
|
|
|
|
}
|