mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-11 12:08:02 -06:00
feat: Replaced old label form fields with full page search, removed badge from edit button in document details
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||
import 'package:form_builder_validators/form_builder_validators.dart';
|
||||
|
||||
import 'package:paperless_api/paperless_api.dart';
|
||||
import 'package:paperless_mobile/extensions/flutter_extensions.dart';
|
||||
import 'package:paperless_mobile/features/documents/view/widgets/search/document_filter_form.dart';
|
||||
@@ -55,7 +55,12 @@ class _AddSavedViewPageState extends State<AddSavedViewPage> {
|
||||
children: [
|
||||
FormBuilderTextField(
|
||||
name: _AddSavedViewPageState.fkName,
|
||||
validator: FormBuilderValidators.required(),
|
||||
validator: (value) {
|
||||
if (value?.trim().isEmpty ?? true) {
|
||||
return S.of(context)!.thisFieldIsRequired;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
label: Text(S.of(context)!.name),
|
||||
),
|
||||
|
||||
@@ -23,8 +23,13 @@ class SavedViewList extends StatelessWidget {
|
||||
Center(
|
||||
child: Text("Saved views loading..."),
|
||||
),
|
||||
loaded: (savedViews, correspondents, documentTypes, tags,
|
||||
storagePaths) {
|
||||
loaded: (
|
||||
savedViews,
|
||||
correspondents,
|
||||
documentTypes,
|
||||
tags,
|
||||
storagePaths,
|
||||
) {
|
||||
if (savedViews.isEmpty) {
|
||||
return SliverToBoxAdapter(
|
||||
child: HintCard(
|
||||
@@ -47,11 +52,12 @@ class SavedViewList extends StatelessWidget {
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => MultiBlocProvider(
|
||||
builder: (ctxt) => MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider(
|
||||
create: (context) => SavedViewDetailsCubit(
|
||||
context.read(),
|
||||
ctxt.read(),
|
||||
ctxt.read(),
|
||||
context.read(),
|
||||
savedView: view,
|
||||
),
|
||||
@@ -71,7 +77,12 @@ class SavedViewList extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
error: (correspondents, documentTypes, tags, storagePaths) =>
|
||||
error: (
|
||||
correspondents,
|
||||
documentTypes,
|
||||
tags,
|
||||
storagePaths,
|
||||
) =>
|
||||
Center(
|
||||
child: Text(
|
||||
"An error occurred while trying to load the saved views.",
|
||||
|
||||
Reference in New Issue
Block a user