Add set_balance_as_sum and wait_with_text to BankAccountConnector
This commit is contained in:
parent
3f25138997
commit
75129b52c6
3 changed files with 15 additions and 6 deletions
|
@ -526,11 +526,12 @@ de:
|
||||||
text_2: Die hier gezeigten Spalten sind Beispiele. Ist ein "x" in der ersten Spalte, wird der Artikel aussortiert und entfernt. Das erlaubt Dir die Tabelle zu ändern und schnell viele Artikel auf ein Mal zu entfernen, zum Beispiel wenn Artkiel des Lieferanten nicht mehr verfügbar sind. Die Kategorie wird der Foodsoft Kategorie zugeordnet (durch die Kategorienamen und die Importnamen).
|
text_2: Die hier gezeigten Spalten sind Beispiele. Ist ein "x" in der ersten Spalte, wird der Artikel aussortiert und entfernt. Das erlaubt Dir die Tabelle zu ändern und schnell viele Artikel auf ein Mal zu entfernen, zum Beispiel wenn Artkiel des Lieferanten nicht mehr verfügbar sind. Die Kategorie wird der Foodsoft Kategorie zugeordnet (durch die Kategorienamen und die Importnamen).
|
||||||
title: Artikel des Lieferanten %{supplier} hochladen
|
title: Artikel des Lieferanten %{supplier} hochladen
|
||||||
bank_account_connector:
|
bank_account_connector:
|
||||||
confirm_app: Bitte bestätige den Code %{code} in deiner App.
|
confirm: Bitte bestätige den Code %{code}.
|
||||||
fields:
|
fields:
|
||||||
email: E-Mail
|
email: E-Mail
|
||||||
pin: PIN
|
pin: PIN
|
||||||
password: Passwort
|
password: Passwort
|
||||||
|
tan: TAN
|
||||||
username: Benutzername
|
username: Benutzername
|
||||||
config:
|
config:
|
||||||
hints:
|
hints:
|
||||||
|
|
|
@ -544,11 +544,12 @@ en:
|
||||||
text_2: The rows shown here are examples. When there is an "x" in the first column, the article is outlisted and will be removed. This allows you to edit the spreadsheet and quickly remove many articles at once, for example when articles become unavailable with the supplier. The category will be matched to your Foodsoft category list (both by category name and import names).
|
text_2: The rows shown here are examples. When there is an "x" in the first column, the article is outlisted and will be removed. This allows you to edit the spreadsheet and quickly remove many articles at once, for example when articles become unavailable with the supplier. The category will be matched to your Foodsoft category list (both by category name and import names).
|
||||||
title: Upload articles of %{supplier}
|
title: Upload articles of %{supplier}
|
||||||
bank_account_connector:
|
bank_account_connector:
|
||||||
confirm_app: Please confirm the code %{code} in your app.
|
confirm: Please confirum the code %{code}.
|
||||||
fields:
|
fields:
|
||||||
email: E-Mail
|
email: E-Mail
|
||||||
pin: PIN
|
pin: PIN
|
||||||
password: Password
|
password: Password
|
||||||
|
tan: TAN
|
||||||
username: Username
|
username: Username
|
||||||
config:
|
config:
|
||||||
hints:
|
hints:
|
||||||
|
|
|
@ -96,14 +96,18 @@ class BankAccountConnector
|
||||||
@controls += [TextItem.new(data)]
|
@controls += [TextItem.new(data)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def wait_with_text(auto_submit, data)
|
def confirm_text(code)
|
||||||
|
text t('.confirm', code: code)
|
||||||
|
end
|
||||||
|
|
||||||
|
def wait_with_text(auto_submit, code)
|
||||||
@auto_submit = auto_submit
|
@auto_submit = auto_submit
|
||||||
@controls += [TextItem.new(data)]
|
confirm_text code
|
||||||
end
|
end
|
||||||
|
|
||||||
def wait_for_app(code)
|
def wait_for_app(code)
|
||||||
hidden_field :twofactor, code
|
hidden_field :twofactor, code
|
||||||
wait_with_text 3000, t('.confirm_app', code: code)
|
wait_with_text 3000, code
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -119,11 +123,14 @@ class BankAccountConnector
|
||||||
@controls += [PasswordField.new(name, value, t(name))]
|
@controls += [PasswordField.new(name, value, t(name))]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def set_balance(amount)
|
def set_balance(amount)
|
||||||
@bank_account.balance = amount
|
@bank_account.balance = amount
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def set_balance_as_sum
|
||||||
|
@bank_account.balance = @bank_account.bank_transactions.sum(:amount)
|
||||||
|
end
|
||||||
|
|
||||||
def continuation_point
|
def continuation_point
|
||||||
@bank_account.import_continuation_point
|
@bank_account.import_continuation_point
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue