mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 16:46:57 +00:00
Merge pull request #308 from Reena-cell/develop
improve consistency in ATM list
This commit is contained in:
commit
dcd7b57860
@ -186,7 +186,7 @@ class CreateAtmForm(forms.Form):
|
||||
required=False,
|
||||
)
|
||||
located_at = forms.CharField(
|
||||
label=_('ATM location'),
|
||||
label=_('ATM Location'),
|
||||
widget=forms.TextInput(
|
||||
attrs={
|
||||
'placeholder': 'OBP',
|
||||
@ -196,7 +196,7 @@ class CreateAtmForm(forms.Form):
|
||||
required=False,
|
||||
)
|
||||
more_info = forms.CharField(
|
||||
label=_('More information'),
|
||||
label=_('More Information'),
|
||||
widget=forms.TextInput(
|
||||
attrs={
|
||||
'placeholder': _('short walk to the lake from here'),
|
||||
@ -243,7 +243,7 @@ class CreateAtmForm(forms.Form):
|
||||
),
|
||||
required=False,
|
||||
)
|
||||
supported_currencies = forms.ChoiceField(
|
||||
supported_currencies = forms.ChoiceField( # not be a dropdown
|
||||
label=_('Supported Currencies'),
|
||||
widget=forms.Select(
|
||||
attrs={
|
||||
@ -253,7 +253,7 @@ class CreateAtmForm(forms.Form):
|
||||
required=False,
|
||||
)
|
||||
notes = forms.ChoiceField(
|
||||
label=_('Write Notes'),
|
||||
label=_('Notes'),
|
||||
widget=forms.Select(
|
||||
attrs={
|
||||
'class': 'form-control',
|
||||
@ -262,7 +262,7 @@ class CreateAtmForm(forms.Form):
|
||||
required=False,
|
||||
)
|
||||
location_categories = forms.ChoiceField(
|
||||
label=_('Write location Category'),
|
||||
label=_('Location Category'),
|
||||
widget=forms.Select(
|
||||
attrs={
|
||||
'class': 'form-control',
|
||||
@ -311,7 +311,7 @@ class CreateAtmForm(forms.Form):
|
||||
required=False,
|
||||
)
|
||||
cash_withdrawal_national_fee = forms.CharField(
|
||||
label=_('Cash Withdrawal National fee'),
|
||||
label=_('Cash Withdrawal National Fee'),
|
||||
widget=forms.TextInput(
|
||||
attrs={
|
||||
'placeholder': _('Cash withdrawal national fee'),
|
||||
@ -321,7 +321,7 @@ class CreateAtmForm(forms.Form):
|
||||
required=False,
|
||||
)
|
||||
cash_withdrawal_international_fee = forms.CharField(
|
||||
label=_('Cash Withdrawal international fee'),
|
||||
label=_('Cash Withdrawal International Fee'),
|
||||
widget=forms.TextInput(
|
||||
attrs={
|
||||
'placeholder': _('Cash withdrawal international fee'),
|
||||
|
||||
@ -37,9 +37,9 @@ class IndexAtmsView(LoginRequiredMixin, FormView):
|
||||
fields['bank_id'].choices = self.api.get_bank_id_choices()
|
||||
fields['is_accessible'].choices = [('',_(CHOOSE)),(True, True), (False, False)]
|
||||
fields['has_deposit_capability'].choices = [('',_(CHOOSE)),(True, True), (False, False)]
|
||||
fields['supported_languages'].choices = [('',_(CHOOSE)),("en", "en"), ("fr", "fr"), ("de", "de")]
|
||||
fields['supported_languages'].choices = [('',_(CHOOSE)),("en", "en"), ("fr", "fr"), ("de", "de"), ("es", "es")]
|
||||
fields['notes'].choices = [('',_(CHOOSE)),("String1", "String1"), ("String2", "String2")]
|
||||
fields['supported_currencies'].choices = [('',_(CHOOSE)),("EUR", "EUR"), ("MXN", "MXN"), ("USD", "USD")]
|
||||
fields['supported_currencies'].choices = [('',_(CHOOSE)),("EUR", "EUR"), ("MXN", "MXN"), ("USD", "USD")] # TODO: get from API
|
||||
fields['location_categories'].choices = [('',_(CHOOSE)),("ATBI", "ATBI"), ("ATBE", "ATBE")]
|
||||
fields['lobby'].initial = json.dumps({
|
||||
"monday": [
|
||||
@ -264,11 +264,13 @@ class UpdateAtmsView(LoginRequiredMixin, FormView):
|
||||
|
||||
def _paylod_languages_and_currencies(self, result, fields):
|
||||
if result['supported_languages'][0].lower()=='en':
|
||||
fields['supported_languages'].choices = [("en", "en"), ("fr", "fr"), ("de", "de")]
|
||||
fields['supported_languages'].choices = [("en", "en"), ("fr", "fr"), ("de", "de"), ("es", "es")]
|
||||
elif result['supported_languages'][0].lower()=='fr':
|
||||
fields['supported_languages'].choices = [("fr", "fr"), ("en", "en"), ("de", "de")]
|
||||
fields['supported_languages'].choices = [("fr", "fr"), ("en", "en"), ("de", "de"), ("es", "es")]
|
||||
elif result['supported_languages'][0].lower()=='es':
|
||||
fields['supported_languages'].choices = [("es", "es"), ("en", "en"), ("de", "de"), ("fr", "fr")]
|
||||
else:
|
||||
fields['supported_languages'].choices = [("de", "de"),("fr", "fr"), ("en", "en")]
|
||||
fields['supported_languages'].choices = [("de", "de"),("fr", "fr"), ("en", "en"), ("es", "es")]
|
||||
fields['supported_languages'].initial = result['supported_languages']
|
||||
if result['supported_currencies'][0].lower()=='EUR':
|
||||
fields['supported_currencies'].choices = [("EUR", "EUR"), ("MXN", "MXN"), ("USD", "USD")]
|
||||
|
||||
@ -928,7 +928,6 @@ class MonthlyMetricsSummaryView(LoginRequiredMixin, TemplateView):
|
||||
# for one month, the from_date is x day ago.
|
||||
form_from_date_string = form.data['from_date_custom']
|
||||
from_date = convert_form_date_to_obpapi_datetime_format(form_from_date_string)
|
||||
#calls_per_day_list, calls_per_day, date_list = self.calls_per_day(, from_date, to_date)
|
||||
calls_per_day_list, calls_per_day, date_list = self.calls_per_day(from_date, to_date, include_app_names)
|
||||
if (len(calls_per_day) <= 31):
|
||||
per_day_chart = self.plot_line_chart(calls_per_day, date_list, "day")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user