Skip to content
This repository has been archived by the owner on Oct 29, 2022. It is now read-only.

Commit

Permalink
Enhancements 1.1 (#102)
Browse files Browse the repository at this point in the history
* feat: use filters from user settings #91

* fix: timeformat exception

* fix: null check

* feat: add reference link in linkfield #90

* feat: add dynamic link #90 #80

* fix: empty list in child table, shortcut filters for basefields,

* feat: date format according to system settings #99

* feat: bigger session expiry for device mobile

* fix: ios downloader fix

* fix: parsedate empty string handling
  • Loading branch information
sumitbhanushali committed Oct 21, 2021
1 parent 7762767 commit 673b308
Show file tree
Hide file tree
Showing 30 changed files with 962 additions and 304 deletions.
4 changes: 4 additions & 0 deletions assets/icons/arrow_right_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
pod 'SQLite.swift'
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
Expand Down
8 changes: 7 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ PODS:
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
- SQLite.swift (0.13.0):
- SQLite.swift/standard (= 0.13.0)
- SQLite.swift/standard (0.13.0)
- Toast (4.0.0)
- url_launcher (0.0.1):
- Flutter
Expand All @@ -103,6 +106,7 @@ DEPENDENCIES:
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- SQLite.swift
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- video_player (from `.symlinks/plugins/video_player/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)
Expand All @@ -118,6 +122,7 @@ SPEC REPOS:
- Reachability
- SDWebImage
- SDWebImageFLPlugin
- SQLite.swift
- Toast

EXTERNAL SOURCES:
Expand Down Expand Up @@ -181,12 +186,13 @@ SPEC CHECKSUMS:
SDWebImageFLPlugin: 6c2295fb1242d44467c6c87dc5db6b0a13228fd8
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
SQLite.swift: 8add701609fd0ef78d097dcc75d20a9782e6f5fc
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
wakelock: b0843b2479edbf6504d8d262c2959446f35373aa
webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
PODFILE CHECKSUM: c990cab2bdc393dc88aba776a5ef266622e941de

COCOAPODS: 1.10.1
52 changes: 25 additions & 27 deletions lib/app/locator.config.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/config/frappe_icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class FrappeIcons {
static const home_outlined = '$_basePath/home_outlined.svg';
static const select = '$_basePath/select.svg';
static const arrow_right = '$_basePath/arrow_right.svg';
static const arrow_right_2 = '$_basePath/arrow_right_2.svg';
static const email = '$_basePath/email.svg';
static const unlock = '$_basePath/unlock.svg';
static const sort_ascending = '$_basePath/sort_ascending.svg';
Expand Down
11 changes: 11 additions & 0 deletions lib/form/controls/control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:frappe_app/config/frappe_palette.dart';

import 'package:frappe_app/config/palette.dart';
import 'package:frappe_app/form/controls/currency.dart';
import 'package:frappe_app/form/controls/dynamic_link.dart';
import 'package:frappe_app/form/controls/read_only.dart';
import 'package:frappe_app/form/controls/text.dart';
import 'package:frappe_app/model/common.dart';
Expand Down Expand Up @@ -47,6 +48,16 @@ Widget makeControl({
}
break;

case "Dynamic Link":
{
control = DynamicLink(
doctypeField: field,
doc: doc,
onControlChanged: onControlChanged,
);
}
break;

case "Autocomplete":
{
control = AutoComplete(
Expand Down
2 changes: 1 addition & 1 deletion lib/form/controls/custom_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CustomTable extends StatelessWidget {
name: doctypeField.fieldname,
context: context,
doctype: doctypeField.options,
value: doc[doctypeField.fieldname],
initialValue: doc[doctypeField.fieldname],
);
}
}
11 changes: 11 additions & 0 deletions lib/form/controls/date.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:frappe_app/model/offline_storage.dart';
import 'package:frappe_app/model/system_settings_response.dart';
import 'package:frappe_app/utils/constants.dart';
import 'package:intl/intl.dart';

import '../../config/palette.dart';
import '../../model/doctype_response.dart';
Expand Down Expand Up @@ -32,12 +36,19 @@ class Date extends StatelessWidget with Control, ControlInput {
);
}

var dateFormat = SystemSettingsResponse.fromJson(
OfflineStorage.getItem("systemSettings")["data"],
).message.defaults.dateFormat;

return FormBuilderDateTimePicker(
key: key,
inputType: InputType.date,
valueTransformer: (val) {
return val?.toIso8601String();
},
format: DateFormat(
Constants.frappeFlutterDateFormatMapping[dateFormat],
),
initialValue:
doc != null ? parseDate(doc![doctypeField.fieldname]) : null,
keyboardType: TextInputType.number,
Expand Down
Loading

0 comments on commit 673b308

Please sign in to comment.