fixes 41 build
parent
b343d433e9
commit
d2ff26e89c
|
|
@ -12,6 +12,8 @@ import 'package:aman_kassa_flutter/shared/ui_helpers.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
import '../../core/services/navigator_service.dart';
|
||||||
|
|
||||||
class BankSettingView extends StatefulWidget {
|
class BankSettingView extends StatefulWidget {
|
||||||
BankSettingView();
|
BankSettingView();
|
||||||
|
|
||||||
|
|
@ -22,7 +24,7 @@ class BankSettingView extends StatefulWidget {
|
||||||
class _BankSettingViewState extends State<BankSettingView> {
|
class _BankSettingViewState extends State<BankSettingView> {
|
||||||
late TextEditingController _emailController;
|
late TextEditingController _emailController;
|
||||||
late TextEditingController _passwordController;
|
late TextEditingController _passwordController;
|
||||||
final BankService _bankService = locator<BankService>();
|
final NavigatorService _navigatorService = locator<NavigatorService>();
|
||||||
final DialogService _dialogService = locator<DialogService>();
|
final DialogService _dialogService = locator<DialogService>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -54,6 +56,7 @@ class _BankSettingViewState extends State<BankSettingView> {
|
||||||
FocusScope.of(_context).unfocus();
|
FocusScope.of(_context).unfocus();
|
||||||
await Redux.store!.dispatch(saveData(_emailController.text, _passwordController.text));
|
await Redux.store!.dispatch(saveData(_emailController.text, _passwordController.text));
|
||||||
_dialogService.showDialog(description: 'Данные сохранены');
|
_dialogService.showDialog(description: 'Данные сохранены');
|
||||||
|
_navigatorService.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -72,7 +75,7 @@ class _BankSettingViewState extends State<BankSettingView> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
verticalSpaceTiny,
|
verticalSpaceTiny,
|
||||||
Text(
|
Text(
|
||||||
'Необходимо указать почту и пароль для подключения к системе проведения платежей',
|
'Необходимо указать почту/номер и пароль для подключения к системе проведения платежей',
|
||||||
style: TextStyle(fontSize: 15.0),
|
style: TextStyle(fontSize: 15.0),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
|
@ -80,7 +83,7 @@ class _BankSettingViewState extends State<BankSettingView> {
|
||||||
TextField(
|
TextField(
|
||||||
controller: _emailController,
|
controller: _emailController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: 'E-Mail', hintText: "Введите адрес почты"),
|
labelText: 'E-Mail / Номер телефона ', hintText: "Введите адрес почты"),
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
),
|
),
|
||||||
TextField(
|
TextField(
|
||||||
|
|
|
||||||
|
|
@ -212,20 +212,23 @@ class _PaymentViewState extends State<PaymentView> {
|
||||||
_total = double.parse(value);
|
_total = double.parse(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.password == null || state.login == null || state.password!.length < 1 || state.login!.length < 1) {
|
if (state.password == null || state.login == null ||
|
||||||
|
state.password!.length < 1 || state.login!.length < 1) {
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: isBusy ? null : () async {
|
onTap: isBusy ?
|
||||||
|
() {} :
|
||||||
|
() async {
|
||||||
var today = new DateTime.now();
|
var today = new DateTime.now();
|
||||||
var yesterday = today.subtract(new Duration(days: 1));
|
var yesterday = today.subtract(new Duration(days: 1));
|
||||||
if( Redux.store!.state.userState == null
|
if (Redux.store!.state.userState == null
|
||||||
|| Redux.store!.state.userState!.smena == null
|
|| Redux.store!.state.userState!.smena == null
|
||||||
|| Redux.store!.state.userState!.smena!.startedAt == null
|
|| Redux.store!.state.userState!.smena!.startedAt == null
|
||||||
|| yesterday.isAfter(Redux.store!.state.userState!.smena!.startedAt!)) {
|
|| yesterday.isAfter(
|
||||||
_dialogService.showDialog(description: 'Текущая смена открыта более 24 ч. Необходимо закрыть смену и открыть ее заново.');
|
Redux.store!.state.userState!.smena!.startedAt!)) {
|
||||||
|
_dialogService.showDialog(
|
||||||
|
description: 'Текущая смена открыта более 24 ч. Необходимо закрыть смену и открыть ее заново.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
@ -250,23 +253,17 @@ class _PaymentViewState extends State<PaymentView> {
|
||||||
splashColor: halykColor.withOpacity(0.4),
|
splashColor: halykColor.withOpacity(0.4),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
highlightColor: halykColor.withOpacity(0.1),
|
highlightColor: halykColor.withOpacity(0.1),
|
||||||
child: Container(
|
child: SizedBox(
|
||||||
width: ScreenUtil().setSp(100.0),
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(10.0)
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: ScreenUtil().setSp(80.0),
|
width: ScreenUtil().setSp(80.0),
|
||||||
height: ScreenUtil().setSp(80.0),
|
height: ScreenUtil().setSp(80.0),
|
||||||
margin: const EdgeInsets.only(bottom: 8.0),
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
border: Border.all(color: Colors.white),
|
border: Border.all(color: Colors.white),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/halykpos.png'), fit: BoxFit.fitWidth
|
image: AssetImage('assets/images/halykpos.png'),
|
||||||
|
fit: BoxFit.fitWidth
|
||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
|
|
@ -278,19 +275,6 @@ class _PaymentViewState extends State<PaymentView> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// Icon(
|
|
||||||
// MdiIcons.nfc,
|
|
||||||
// color: halykColor,
|
|
||||||
// size: ScreenUtil().setSp(20.0),
|
|
||||||
// ),
|
|
||||||
// Text('Tap2Phone',style: TextStyle(fontSize: ScreenUtil().setSp(10.0), color: halykColor, fontWeight: FontWeight.bold ),),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -343,10 +327,12 @@ class _PaymentViewState extends State<PaymentView> {
|
||||||
_navigatorService.pop();
|
_navigatorService.pop();
|
||||||
_navigatorService.push(ImageShowRoute,
|
_navigatorService.push(ImageShowRoute,
|
||||||
arguments: ImageShowModel(data: new CheckImageModal(
|
arguments: ImageShowModel(data: new CheckImageModal(
|
||||||
base64Data: check, textData: checkText != null ? jsonEncode(checkText) : null),
|
base64Data: check,
|
||||||
|
textData: checkText != null ? jsonEncode(checkText) : null),
|
||||||
title: message,
|
title: message,
|
||||||
url: url));
|
url: url));
|
||||||
} else if (!response.operation && ![401, 402, 403, 412, 500].contains(response.status)) {
|
} else if (!response.operation &&
|
||||||
|
![401, 402, 403, 412, 500].contains(response.status)) {
|
||||||
Navigator.of(_keyLoader.currentContext!, rootNavigator: true).pop();
|
Navigator.of(_keyLoader.currentContext!, rootNavigator: true).pop();
|
||||||
_dialogService.showDialog(description: response.body['message']);
|
_dialogService.showDialog(description: response.body['message']);
|
||||||
} else if (!response.operation && response.body['message'] != null) {
|
} else if (!response.operation && response.body['message'] != null) {
|
||||||
|
|
@ -398,5 +384,6 @@ class PaymentModel {
|
||||||
Voucher? voucher;
|
Voucher? voucher;
|
||||||
CardData? cardData;
|
CardData? cardData;
|
||||||
|
|
||||||
PaymentModel({required this.mode, required this.operationType, this.voucher, this.cardData});
|
PaymentModel(
|
||||||
|
{required this.mode, required this.operationType, this.voucher, this.cardData});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: aman_kassa_flutter
|
name: aman_kassa_flutter
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
version: 1.3.0+40
|
version: 1.3.0+41
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.15.0 <3.0.0'
|
sdk: '>=2.15.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue