Racib and Crypto_int

This commit is contained in:
vtretyakov
2019-02-14 16:43:00 +07:00
parent d29e035040
commit 56e42a8594
9 changed files with 52 additions and 51 deletions

View File

@@ -45,6 +45,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
void initState() {
loading = true;
requestAsyncData(user);
loading = false;
buildFocusNode();
scrollController = new ScrollController();
super.initState();
@@ -74,11 +75,8 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
));
widgetList.add(getValueWithDescription(StringsLocalization.card(), card));
if (app != 'crypto') {
if (app != 'crypto' || app != 'racib') {
widgetList.add(getValueWithDescription(StringsLocalization.reward(), loyalty));
}
if (app != 'crypto') {
if (bonus.length > 0) {
widgetList.add(getValueWithDescription(StringsLocalization.bonus(), bonus));
}
@@ -87,7 +85,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
widgetList.add(getHintLabel());
widgetList.add(getInputField()); // Нельзя добавить еще одно поле таким же способом
if ((app != 'autobonus') || (app != 'crypto')) {
if ((app != 'autobonus') || (app != 'crypto') || (app != 'racib')) {
if (this.loyalityType == 'bonus') {
widgetList.add(getBonusInputField());
@@ -133,7 +131,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
var bonusTextField = new TextField(
keyboardType: TextInputType.number,
decoration: new InputDecoration.collapsed(
hintText: (app != 'crypto') ? StringsLocalization.bonusHint() : StringsLocalization.joysHint(),
hintText: StringsLocalization.bonusHint(),
hintStyle: new TextStyle(color: greyTextColor, fontSize: 16.0)
),
focusNode: bonusFocusNode,
@@ -163,7 +161,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
top: 5.0
),
child: new Text(
(app == 'crypto') ? " " : StringsLocalization.bonusExplanation(),
StringsLocalization.bonusExplanation(),
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
style: new TextStyle(color: greyTextColor, fontSize: 11.0),

View File

@@ -91,7 +91,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
widgetList.add(getValueWithDescription(StringsLocalization.buyer(), username));
widgetList.add(getSuccessMessage());
if (app != 'crypto') {
if (app != 'crypto' || app != 'racib') {
if (bonusPlus > 0) {
widgetList.add(getValueWithDescription(StringsLocalization.bonusPlus(), bonusPlus.toString()));
}
@@ -103,11 +103,11 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
if (app != 'autobonus') {
widgetList.add(getValueWithDescription(StringsLocalization.discountRate(), '${details['discount']}%'));
if (app != 'crypto') {
if (app != 'crypto' || app != 'racib') {
widgetList.add(getValueWithDescription(StringsLocalization.discountSum(), '${details['sum_discount']}'));
}
}
if (app != 'crypto' && this.coupons.length > 0) {
if ((app != 'crypto' || app != 'racib') && this.coupons.length > 0) {
widgetList.add(getItemTitle(StringsLocalization.couponsUsed()));
this.coupons.forEach((couponItem) {
widgetList.add(getItemToggle(
@@ -165,7 +165,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
getMessageTitle() {
if (currency != null) {
if (app != 'crypto') {
if (app != 'crypto' || app != 'racib') {
return StringsLocalization.paymentCompleted(sum, currency);
} else {
return StringsLocalization.purchaseCompleted(sum, currency);