mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-11-04 07:15:46 +00:00 
			
		
		
		
	Fixed (most) of the raw text instances
This commit is contained in:
		@@ -116,7 +116,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
 | 
				
			|||||||
    tiles.add(
 | 
					    tiles.add(
 | 
				
			||||||
      ListTile(
 | 
					      ListTile(
 | 
				
			||||||
        title: Text(I18N.of(context).releaseNotes),
 | 
					        title: Text(I18N.of(context).releaseNotes),
 | 
				
			||||||
        subtitle: Text("Display app release notes"),
 | 
					        subtitle: Text(I18N.of(context).appReleaseNotes),
 | 
				
			||||||
        leading: FaIcon(FontAwesomeIcons.fileAlt),
 | 
					        leading: FaIcon(FontAwesomeIcons.fileAlt),
 | 
				
			||||||
        onTap: () {
 | 
					        onTap: () {
 | 
				
			||||||
          _releaseNotes(context);
 | 
					          _releaseNotes(context);
 | 
				
			||||||
@@ -127,7 +127,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
 | 
				
			|||||||
    tiles.add(
 | 
					    tiles.add(
 | 
				
			||||||
      ListTile(
 | 
					      ListTile(
 | 
				
			||||||
        title: Text(I18N.of(context).credits),
 | 
					        title: Text(I18N.of(context).credits),
 | 
				
			||||||
        subtitle: Text("Additional app credits"),
 | 
					        subtitle: Text(I18N.of(context).appCredits),
 | 
				
			||||||
        leading: FaIcon(FontAwesomeIcons.bullhorn),
 | 
					        leading: FaIcon(FontAwesomeIcons.bullhorn),
 | 
				
			||||||
        onTap: () {
 | 
					        onTap: () {
 | 
				
			||||||
          _credits(context);
 | 
					          _credits(context);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,8 +95,8 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
 | 
				
			|||||||
              leading: FaIcon(FontAwesomeIcons.shapes),
 | 
					              leading: FaIcon(FontAwesomeIcons.shapes),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            ListTile(
 | 
					            ListTile(
 | 
				
			||||||
              title: Text("Include Subcategories"),
 | 
					              title: Text(I18N.of(context).includeSubcategories),
 | 
				
			||||||
              subtitle: Text("Display subcategory parts in list view"),
 | 
					              subtitle: Text(I18N.of(context).includeSubcategoriesDetail),
 | 
				
			||||||
              leading: FaIcon(FontAwesomeIcons.sitemap),
 | 
					              leading: FaIcon(FontAwesomeIcons.sitemap),
 | 
				
			||||||
              trailing: Switch(
 | 
					              trailing: Switch(
 | 
				
			||||||
                value: partSubcategory,
 | 
					                value: partSubcategory,
 | 
				
			||||||
@@ -111,8 +111,8 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
 | 
				
			|||||||
              leading: FaIcon(FontAwesomeIcons.boxes),
 | 
					              leading: FaIcon(FontAwesomeIcons.boxes),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            ListTile(
 | 
					            ListTile(
 | 
				
			||||||
              title: Text("Include Sublocations"),
 | 
					              title: Text(I18N.of(context).includeSublocations),
 | 
				
			||||||
              subtitle: Text("Display sublocation items in list view"),
 | 
					              subtitle: Text(I18N.of(context).includeSublocationsDetail),
 | 
				
			||||||
              leading: FaIcon(FontAwesomeIcons.sitemap),
 | 
					              leading: FaIcon(FontAwesomeIcons.sitemap),
 | 
				
			||||||
              trailing: Switch(
 | 
					              trailing: Switch(
 | 
				
			||||||
                value: stockSublocation,
 | 
					                value: stockSublocation,
 | 
				
			||||||
@@ -129,7 +129,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
 | 
				
			|||||||
            ),
 | 
					            ),
 | 
				
			||||||
            ListTile(
 | 
					            ListTile(
 | 
				
			||||||
              title: Text(I18N.of(context).serverError),
 | 
					              title: Text(I18N.of(context).serverError),
 | 
				
			||||||
              subtitle: Text("Play audible tone on server error"),
 | 
					              subtitle: Text(I18N.of(context).soundOnServerError),
 | 
				
			||||||
              leading: FaIcon(FontAwesomeIcons.server),
 | 
					              leading: FaIcon(FontAwesomeIcons.server),
 | 
				
			||||||
              trailing: Switch(
 | 
					              trailing: Switch(
 | 
				
			||||||
                value: serverSounds,
 | 
					                value: serverSounds,
 | 
				
			||||||
@@ -138,7 +138,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
 | 
				
			|||||||
            ),
 | 
					            ),
 | 
				
			||||||
            ListTile(
 | 
					            ListTile(
 | 
				
			||||||
              title: Text(I18N.of(context).barcodeTones),
 | 
					              title: Text(I18N.of(context).barcodeTones),
 | 
				
			||||||
              subtitle: Text("Play audible tones for barcode actions"),
 | 
					              subtitle: Text(I18N.of(context).soundOnBarcodeAction),
 | 
				
			||||||
              leading: FaIcon(FontAwesomeIcons.qrcode),
 | 
					              leading: FaIcon(FontAwesomeIcons.qrcode),
 | 
				
			||||||
              trailing: Switch(
 | 
					              trailing: Switch(
 | 
				
			||||||
                value: barcodeSounds,
 | 
					                value: barcodeSounds,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -300,7 +300,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> {
 | 
				
			|||||||
      // No profile available!
 | 
					      // No profile available!
 | 
				
			||||||
      children.add(
 | 
					      children.add(
 | 
				
			||||||
        ListTile(
 | 
					        ListTile(
 | 
				
			||||||
          title: Text("No profiles available"),
 | 
					          title: Text(I18N.of(context).profileNone),
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -163,7 +163,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
 | 
				
			|||||||
    if (category == null) {
 | 
					    if (category == null) {
 | 
				
			||||||
      return Card(
 | 
					      return Card(
 | 
				
			||||||
        child: ListTile(
 | 
					        child: ListTile(
 | 
				
			||||||
          title: Text("Top level part category"),
 | 
					          title: Text(I18N.of(context).partCategoryTopLevel)
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
@@ -248,8 +248,8 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
 | 
				
			|||||||
      tiles.add(progressIndicator());
 | 
					      tiles.add(progressIndicator());
 | 
				
			||||||
    } else if (_subcategories.length == 0) {
 | 
					    } else if (_subcategories.length == 0) {
 | 
				
			||||||
      tiles.add(ListTile(
 | 
					      tiles.add(ListTile(
 | 
				
			||||||
        title: Text("No Subcategories"),
 | 
					        title: Text(I18N.of(context).noSubcategories),
 | 
				
			||||||
        subtitle: Text("No subcategories available")
 | 
					        subtitle: Text(I18N.of(context).noSubcategoriesAvailable)
 | 
				
			||||||
      ));
 | 
					      ));
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      tiles.add(SubcategoryList(_subcategories));
 | 
					      tiles.add(SubcategoryList(_subcategories));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -66,13 +66,13 @@ class ImagePickerField extends FormField<File> {
 | 
				
			|||||||
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
 | 
					              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
 | 
				
			||||||
              children: <Widget>[
 | 
					              children: <Widget>[
 | 
				
			||||||
                FlatButton(
 | 
					                FlatButton(
 | 
				
			||||||
                  child: Text("Select Image"),
 | 
					                  child: Text(I18N.of(context).selectImage),
 | 
				
			||||||
                  onPressed: () {
 | 
					                  onPressed: () {
 | 
				
			||||||
                    _selectFromGallery(state);
 | 
					                    _selectFromGallery(state);
 | 
				
			||||||
                  },
 | 
					                  },
 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
                FlatButton(
 | 
					                FlatButton(
 | 
				
			||||||
                  child: Text("Take Picture"),
 | 
					                  child: Text(I18N.of(context).takePicture),
 | 
				
			||||||
                  onPressed: () {
 | 
					                  onPressed: () {
 | 
				
			||||||
                    _selectFromCamera(state);
 | 
					                    _selectFromCamera(state);
 | 
				
			||||||
                  },
 | 
					                  },
 | 
				
			||||||
@@ -81,7 +81,7 @@ class ImagePickerField extends FormField<File> {
 | 
				
			|||||||
            ),
 | 
					            ),
 | 
				
			||||||
          );
 | 
					          );
 | 
				
			||||||
          return ListTile(
 | 
					          return ListTile(
 | 
				
			||||||
            title: Text("Select Image"),
 | 
					            title: Text(I18N.of(context).selectImage),
 | 
				
			||||||
          );
 | 
					          );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -104,22 +104,6 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void _unsupported() {
 | 
					 | 
				
			||||||
    showDialog(
 | 
					 | 
				
			||||||
        context:  context,
 | 
					 | 
				
			||||||
        child: new SimpleDialog(
 | 
					 | 
				
			||||||
          title: new Text("Unsupported"),
 | 
					 | 
				
			||||||
          children: <Widget>[
 | 
					 | 
				
			||||||
            ListTile(
 | 
					 | 
				
			||||||
              title: Text("This feature is not yet supported"),
 | 
					 | 
				
			||||||
              subtitle: Text("It will be supported in an upcoming release"),
 | 
					 | 
				
			||||||
            )
 | 
					 | 
				
			||||||
          ],
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  void _loadProfile() async {
 | 
					  void _loadProfile() async {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _profile = await UserProfileDBManager().getSelectedProfile();
 | 
					    _profile = await UserProfileDBManager().getSelectedProfile();
 | 
				
			||||||
@@ -144,8 +128,8 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
 | 
				
			|||||||
    // Tap to select / create a profile
 | 
					    // Tap to select / create a profile
 | 
				
			||||||
    if (_profile == null) {
 | 
					    if (_profile == null) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
        title: Text("No Profile Selected"),
 | 
					        title: Text(I18N.of(context).profileNotSelected),
 | 
				
			||||||
        subtitle: Text("Tap to create or select a profile"),
 | 
					        subtitle: Text(I18N.of(context).profileTapToCreate),
 | 
				
			||||||
        leading: FaIcon(FontAwesomeIcons.server),
 | 
					        leading: FaIcon(FontAwesomeIcons.server),
 | 
				
			||||||
        trailing: FaIcon(
 | 
					        trailing: FaIcon(
 | 
				
			||||||
          FontAwesomeIcons.user,
 | 
					          FontAwesomeIcons.user,
 | 
				
			||||||
@@ -160,7 +144,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
 | 
				
			|||||||
    // Profile is selected ...
 | 
					    // Profile is selected ...
 | 
				
			||||||
    if (InvenTreeAPI().isConnecting()) {
 | 
					    if (InvenTreeAPI().isConnecting()) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
        title: Text("Connecting to server..."),
 | 
					        title: Text(I18N.of(context).serverConnecting),
 | 
				
			||||||
        subtitle: Text("${InvenTreeAPI().baseUrl}"),
 | 
					        subtitle: Text("${InvenTreeAPI().baseUrl}"),
 | 
				
			||||||
        leading: FaIcon(FontAwesomeIcons.server),
 | 
					        leading: FaIcon(FontAwesomeIcons.server),
 | 
				
			||||||
        trailing: Spinner(
 | 
					        trailing: Spinner(
 | 
				
			||||||
@@ -173,7 +157,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
    } else if (InvenTreeAPI().isConnected()) {
 | 
					    } else if (InvenTreeAPI().isConnected()) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
        title: Text("Connected to server"),
 | 
					        title: Text(I18N.of(context).serverConnected),
 | 
				
			||||||
        subtitle: Text("${InvenTreeAPI().baseUrl}"),
 | 
					        subtitle: Text("${InvenTreeAPI().baseUrl}"),
 | 
				
			||||||
        leading: FaIcon(FontAwesomeIcons.server),
 | 
					        leading: FaIcon(FontAwesomeIcons.server),
 | 
				
			||||||
        trailing: FaIcon(
 | 
					        trailing: FaIcon(
 | 
				
			||||||
@@ -186,7 +170,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
        title: Text("Could not connect to server"),
 | 
					        title: Text(I18N.of(context).serverCouldNotConnect),
 | 
				
			||||||
        subtitle: Text("${_profile.server}"),
 | 
					        subtitle: Text("${_profile.server}"),
 | 
				
			||||||
        leading: FaIcon(FontAwesomeIcons.server),
 | 
					        leading: FaIcon(FontAwesomeIcons.server),
 | 
				
			||||||
        trailing: FaIcon(
 | 
					        trailing: FaIcon(
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -183,7 +183,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
 | 
				
			|||||||
      if (includeActions) {
 | 
					      if (includeActions) {
 | 
				
			||||||
        children.add(
 | 
					        children.add(
 | 
				
			||||||
            ListTile(
 | 
					            ListTile(
 | 
				
			||||||
              title: Text("Parent Category"),
 | 
					              title: Text(I18N.of(context).parentCategory),
 | 
				
			||||||
              subtitle: Text("${location.parentpathstring}"),
 | 
					              subtitle: Text("${location.parentpathstring}"),
 | 
				
			||||||
              leading: FaIcon(FontAwesomeIcons.levelUpAlt),
 | 
					              leading: FaIcon(FontAwesomeIcons.levelUpAlt),
 | 
				
			||||||
              onTap: () {
 | 
					              onTap: () {
 | 
				
			||||||
@@ -286,8 +286,8 @@ List<Widget> detailTiles() {
 | 
				
			|||||||
      tiles.add(SublocationList(_sublocations));
 | 
					      tiles.add(SublocationList(_sublocations));
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      tiles.add(ListTile(
 | 
					      tiles.add(ListTile(
 | 
				
			||||||
        title: Text("No Sublocations"),
 | 
					        title: Text(I18N.of(context).sublocationNone),
 | 
				
			||||||
        subtitle: Text("No sublocations available")
 | 
					        subtitle: Text(I18N.of(context).sublocationNoneDetail)
 | 
				
			||||||
      ));
 | 
					      ));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -216,7 +216,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
 | 
				
			|||||||
    if (part.categoryName != null && part.categoryName.isNotEmpty) {
 | 
					    if (part.categoryName != null && part.categoryName.isNotEmpty) {
 | 
				
			||||||
      tiles.add(
 | 
					      tiles.add(
 | 
				
			||||||
        ListTile(
 | 
					        ListTile(
 | 
				
			||||||
            title: Text("Part Category"),
 | 
					            title: Text(I18N.of(context).partCategory),
 | 
				
			||||||
            subtitle: Text("${part.categoryName}"),
 | 
					            subtitle: Text("${part.categoryName}"),
 | 
				
			||||||
            leading: FaIcon(FontAwesomeIcons.sitemap),
 | 
					            leading: FaIcon(FontAwesomeIcons.sitemap),
 | 
				
			||||||
            onTap: () {
 | 
					            onTap: () {
 | 
				
			||||||
@@ -232,8 +232,8 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
 | 
				
			|||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      tiles.add(
 | 
					      tiles.add(
 | 
				
			||||||
        ListTile(
 | 
					        ListTile(
 | 
				
			||||||
          title: Text("Part Category"),
 | 
					          title: Text(I18N.of(context).partCategory),
 | 
				
			||||||
          subtitle: Text("Top level part category"),
 | 
					          subtitle: Text(I18N.of(context).partCategoryTopLevel),
 | 
				
			||||||
          leading: FaIcon(FontAwesomeIcons.sitemap),
 | 
					          leading: FaIcon(FontAwesomeIcons.sitemap),
 | 
				
			||||||
          onTap: () {
 | 
					          onTap: () {
 | 
				
			||||||
            Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(null)));
 | 
					            Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(null)));
 | 
				
			||||||
@@ -261,7 +261,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
 | 
				
			|||||||
      if (part.supplier_count > 0) {
 | 
					      if (part.supplier_count > 0) {
 | 
				
			||||||
        tiles.add(
 | 
					        tiles.add(
 | 
				
			||||||
          ListTile(
 | 
					          ListTile(
 | 
				
			||||||
            title: Text("Suppliers"),
 | 
					            title: Text(I18N.of(context).suppliers),
 | 
				
			||||||
            leading: FaIcon(FontAwesomeIcons.industry),
 | 
					            leading: FaIcon(FontAwesomeIcons.industry),
 | 
				
			||||||
            trailing: Text("${part.supplier_count}"),
 | 
					            trailing: Text("${part.supplier_count}"),
 | 
				
			||||||
          )
 | 
					          )
 | 
				
			||||||
@@ -289,7 +289,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
 | 
				
			|||||||
    if (false && part.isAssembly) {
 | 
					    if (false && part.isAssembly) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      tiles.add(ListTile(
 | 
					      tiles.add(ListTile(
 | 
				
			||||||
        title: Text("Bill of Materials"),
 | 
					        title: Text(I18N.of(context).billOfMaterials),
 | 
				
			||||||
        leading: FaIcon(FontAwesomeIcons.thList),
 | 
					        leading: FaIcon(FontAwesomeIcons.thList),
 | 
				
			||||||
        trailing: Text("${part.bomItemCount}"),
 | 
					        trailing: Text("${part.bomItemCount}"),
 | 
				
			||||||
        onTap: null,
 | 
					        onTap: null,
 | 
				
			||||||
@@ -298,7 +298,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      tiles.add(
 | 
					      tiles.add(
 | 
				
			||||||
          ListTile(
 | 
					          ListTile(
 | 
				
			||||||
            title: Text("Building"),
 | 
					            title: Text(I18N.of(context).building),
 | 
				
			||||||
            leading: FaIcon(FontAwesomeIcons.tools),
 | 
					            leading: FaIcon(FontAwesomeIcons.tools),
 | 
				
			||||||
            trailing: Text("${part.building}"),
 | 
					            trailing: Text("${part.building}"),
 | 
				
			||||||
            onTap: null,
 | 
					            onTap: null,
 | 
				
			||||||
@@ -344,7 +344,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
 | 
				
			|||||||
    // TODO - Add request tests?
 | 
					    // TODO - Add request tests?
 | 
				
			||||||
    if (false && part.isTrackable) {
 | 
					    if (false && part.isTrackable) {
 | 
				
			||||||
      tiles.add(ListTile(
 | 
					      tiles.add(ListTile(
 | 
				
			||||||
          title: Text("Required Tests"),
 | 
					          title: Text(I18N.of(context).testsRequired),
 | 
				
			||||||
          leading: FaIcon(FontAwesomeIcons.tasks),
 | 
					          leading: FaIcon(FontAwesomeIcons.tasks),
 | 
				
			||||||
          trailing: Text("${part.testTemplateCount}"),
 | 
					          trailing: Text("${part.testTemplateCount}"),
 | 
				
			||||||
          onTap: null,
 | 
					          onTap: null,
 | 
				
			||||||
@@ -356,11 +356,10 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
 | 
				
			|||||||
    if (part.notes.isNotEmpty) {
 | 
					    if (part.notes.isNotEmpty) {
 | 
				
			||||||
      tiles.add(
 | 
					      tiles.add(
 | 
				
			||||||
          ListTile(
 | 
					          ListTile(
 | 
				
			||||||
            title: Text("Notes"),
 | 
					            title: Text(I18N.of(context).notes),
 | 
				
			||||||
            leading: FaIcon(FontAwesomeIcons.stickyNote),
 | 
					            leading: FaIcon(FontAwesomeIcons.stickyNote),
 | 
				
			||||||
            trailing: Text(""),
 | 
					            trailing: Text(""),
 | 
				
			||||||
            onTap: () {
 | 
					            onTap: () {
 | 
				
			||||||
              print("Hello");
 | 
					 | 
				
			||||||
              Navigator.push(
 | 
					              Navigator.push(
 | 
				
			||||||
                context,
 | 
					                context,
 | 
				
			||||||
                MaterialPageRoute(builder: (context) => PartNotesWidget(part))
 | 
					                MaterialPageRoute(builder: (context) => PartNotesWidget(part))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -157,21 +157,21 @@ class PartSearchDelegate extends SearchDelegate<InvenTreePart> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (query.length == 0) {
 | 
					    if (query.length == 0) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
        title: Text("Enter search query")
 | 
					        title: Text(I18N.of(context).queryEnter)
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (query.length < 3) {
 | 
					    if (query.length < 3) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
        title: Text("Query too short"),
 | 
					        title: Text(I18N.of(context).queryShort),
 | 
				
			||||||
        subtitle: Text("Enter a query of at least three characters")
 | 
					        subtitle: Text(I18N.of(context).queryShortDetail)
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (partResults.length == 0) {
 | 
					    if (partResults.length == 0) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
        title: Text(I18N.of(context).noResults),
 | 
					        title: Text(I18N.of(context).noResults),
 | 
				
			||||||
        subtitle: Text("No results for '${query}'")
 | 
					        subtitle: Text(I18N.of(context).queryNoResults + " '${query}'")
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -340,21 +340,21 @@ class StockSearchDelegate extends SearchDelegate<InvenTreeStockItem> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (query.length == 0) {
 | 
					    if (query.length == 0) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
          title: Text("Enter search query")
 | 
					          title: Text(I18N.of(context).queryEnter)
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (query.length < 3) {
 | 
					    if (query.length < 3) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
          title: Text("Query too short"),
 | 
					          title: Text(I18N.of(context).queryShort),
 | 
				
			||||||
          subtitle: Text("Enter a query of at least three characters")
 | 
					          subtitle: Text(I18N.of(context).queryShortDetail)
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (itemResults.length == 0) {
 | 
					    if (itemResults.length == 0) {
 | 
				
			||||||
      return ListTile(
 | 
					      return ListTile(
 | 
				
			||||||
          title: Text(I18N.of(context).noResults),
 | 
					          title: Text(I18N.of(context).noResults),
 | 
				
			||||||
          subtitle: Text("No results for '${query}'")
 | 
					          subtitle: Text(I18N.of(context).queryNoResults + " '${query}'")
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,8 @@ import 'package:InvenTree/widget/refreshable_state.dart';
 | 
				
			|||||||
import 'package:flutter/cupertino.dart';
 | 
					import 'package:flutter/cupertino.dart';
 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					import 'package:flutter/material.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import 'package:flutter_gen/gen_l10n/app_localizations.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import '../api.dart';
 | 
					import '../api.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -24,7 +26,7 @@ class _StarredPartState extends RefreshableState<StarredPartWidget> {
 | 
				
			|||||||
  List<InvenTreePart> starredParts = [];
 | 
					  List<InvenTreePart> starredParts = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  String getAppBarTitle(BuildContext context) => "Starred Parts";
 | 
					  String getAppBarTitle(BuildContext context) => I18N.of(context).partsStarred;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Future<void> request(BuildContext context) async {
 | 
					  Future<void> request(BuildContext context) async {
 | 
				
			||||||
@@ -75,8 +77,8 @@ class _StarredPartState extends RefreshableState<StarredPartWidget> {
 | 
				
			|||||||
      return ListView(
 | 
					      return ListView(
 | 
				
			||||||
        children: [
 | 
					        children: [
 | 
				
			||||||
          ListTile(
 | 
					          ListTile(
 | 
				
			||||||
            title: Text("No Parts"),
 | 
					            title: Text(I18N.of(context).partsNone),
 | 
				
			||||||
            subtitle: Text("No starred parts available")
 | 
					            subtitle: Text(I18N.of(context).partsStarredNone)
 | 
				
			||||||
          )
 | 
					          )
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -410,7 +410,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
 | 
				
			|||||||
          ListTile(
 | 
					          ListTile(
 | 
				
			||||||
            title: Text(I18N.of(context).stockLocation),
 | 
					            title: Text(I18N.of(context).stockLocation),
 | 
				
			||||||
            leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
 | 
					            leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
 | 
				
			||||||
            subtitle: Text("No location set"),
 | 
					            subtitle: Text(I18N.of(context).locationNotSet),
 | 
				
			||||||
          )
 | 
					          )
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -508,14 +508,14 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
 | 
				
			|||||||
    if (!InvenTreeAPI().checkPermission('stock', 'change')) {
 | 
					    if (!InvenTreeAPI().checkPermission('stock', 'change')) {
 | 
				
			||||||
      tiles.add(
 | 
					      tiles.add(
 | 
				
			||||||
        ListTile(
 | 
					        ListTile(
 | 
				
			||||||
          title: Text("Permission Required"),
 | 
					          title: Text(I18N.of(context).permissionRequired),
 | 
				
			||||||
          leading: FaIcon(FontAwesomeIcons.userTimes)
 | 
					          leading: FaIcon(FontAwesomeIcons.userTimes)
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      tiles.add(
 | 
					      tiles.add(
 | 
				
			||||||
        ListTile(
 | 
					        ListTile(
 | 
				
			||||||
          subtitle: Text("Your account does not have permission to perform stock adjustments"),
 | 
					          subtitle: Text(I18N.of(context).permissionAccountDenied),
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -178,7 +178,7 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    tiles.add(
 | 
					    tiles.add(
 | 
				
			||||||
      ListTile(
 | 
					      ListTile(
 | 
				
			||||||
        title: Text("Test Results",
 | 
					        title: Text(I18N.of(context).testResults,
 | 
				
			||||||
          style: TextStyle(fontWeight: FontWeight.bold)
 | 
					          style: TextStyle(fontWeight: FontWeight.bold)
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
@@ -193,8 +193,8 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (results.length == 0) {
 | 
					    if (results.length == 0) {
 | 
				
			||||||
      tiles.add(ListTile(
 | 
					      tiles.add(ListTile(
 | 
				
			||||||
        title: Text("No Results"),
 | 
					        title: Text(I18N.of(context).testResultNone),
 | 
				
			||||||
        subtitle: Text("No test results available"),
 | 
					        subtitle: Text(I18N.of(context).testResultNoneDetail),
 | 
				
			||||||
      ));
 | 
					      ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return tiles;
 | 
					      return tiles;
 | 
				
			||||||
@@ -254,7 +254,7 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (tiles.isEmpty) {
 | 
					    if (tiles.isEmpty) {
 | 
				
			||||||
      tiles.add(ListTile(
 | 
					      tiles.add(ListTile(
 | 
				
			||||||
        title: Text("No test results"),
 | 
					        title: Text(I18N.of(context).testResultNone),
 | 
				
			||||||
      ));
 | 
					      ));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user