|
|
|
@@ -40,8 +40,10 @@ class _EditActionOtherScreenState extends State<EditActionOtherScreen> { |
|
|
|
final _repository = Repository(); |
|
|
|
GlobalKey<FormState> _formKey = GlobalKey(); |
|
|
|
bool _autoValidate = false; |
|
|
|
var pref = LocalPref(); |
|
|
|
Other _other = Other(); |
|
|
|
final _descriptionController = TextEditingController(); |
|
|
|
final _executeByController = TextEditingController(); |
|
|
|
|
|
|
|
List<ActionType> _actionTypes = List<ActionType>(); |
|
|
|
ActionType _actionType; |
|
|
|
@@ -50,9 +52,15 @@ class _EditActionOtherScreenState extends State<EditActionOtherScreen> { |
|
|
|
List<String> filePaths = List<String>(); |
|
|
|
var changeFileController = Get.put(ChangeFileController()); |
|
|
|
|
|
|
|
Future<Null> getSharedPrefs() async { |
|
|
|
var currentFullName = await pref.getString(DATA_CONST.CURRENT_FULL_NAME); |
|
|
|
_executeByController.text = currentFullName ?? ""; |
|
|
|
} |
|
|
|
|
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
super.initState(); |
|
|
|
getSharedPrefs(); |
|
|
|
changeFileController.initValue(); |
|
|
|
var parsedExecuteDate = |
|
|
|
DateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(executeTime); |
|
|
|
@@ -218,6 +226,16 @@ class _EditActionOtherScreenState extends State<EditActionOtherScreen> { |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
Widget _executeByField() { |
|
|
|
return TextFormField( |
|
|
|
keyboardType: TextInputType.text, |
|
|
|
decoration: InputDecoration(labelText: "Người thực hiện"), |
|
|
|
enabled: false, |
|
|
|
controller: _executeByController, |
|
|
|
onSaved: (newValue) {}, |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
_actionAppBar() { |
|
|
|
IconButton iconButton; |
|
|
|
if (1 == 1) { |
|
|
|
@@ -281,6 +299,7 @@ class _EditActionOtherScreenState extends State<EditActionOtherScreen> { |
|
|
|
_other.activityId = widget.activityId; |
|
|
|
_descriptionController.text = |
|
|
|
_other.description ?? ""; |
|
|
|
_executeByController.text = _other.createdByName; |
|
|
|
|
|
|
|
//select harvest |
|
|
|
getActionTypeBloc.getActionTypes((data) { |
|
|
|
@@ -338,6 +357,10 @@ class _EditActionOtherScreenState extends State<EditActionOtherScreen> { |
|
|
|
SizedBox( |
|
|
|
height: 8.0, |
|
|
|
), |
|
|
|
_executeByField(), |
|
|
|
SizedBox( |
|
|
|
height: 8.0, |
|
|
|
), |
|
|
|
BlocBuilder<MediaHelperBloc, MediaHelperState>( |
|
|
|
builder: (context, state) { |
|
|
|
if (state is MediaHelperSuccess) { |
|
|
|
@@ -361,6 +384,7 @@ class _EditActionOtherScreenState extends State<EditActionOtherScreen> { |
|
|
|
@override |
|
|
|
void dispose() { |
|
|
|
_descriptionController.dispose(); |
|
|
|
_executeByController.dispose(); |
|
|
|
super.dispose(); |
|
|
|
} |
|
|
|
} |