diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index 5226337..9d7cdd0 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -711,6 +711,7 @@ def registration_ajax(request): } res = send_check_email_after_registration(mail_Dict, user) + print(str(res)) # res = send_registration_mail(mail_Dict, user) res_Dict = { diff --git a/RoutesApp/funcs.py b/RoutesApp/funcs.py index 7555e8e..cbef7b5 100644 --- a/RoutesApp/funcs.py +++ b/RoutesApp/funcs.py @@ -1,3 +1,5 @@ +from BaseModels.mailSender import techSendMail +from GeneralApp.funcs_options import get_mail_send_options from .models import * from .forms import * from django.utils.translation import gettext as _ @@ -169,6 +171,10 @@ def get_routes_Dict(user=None, data=None): kwargs.update({ 'owner': user }) + else: + msg = f'get_routes_Dict not have user - user={str(user)}, data={str(data)}' + mail_sets = get_mail_send_options() + techSendMail(mail_sets, msg) from_el = None to_el = None diff --git a/RoutesApp/migrations/0009_alter_route_phone.py b/RoutesApp/migrations/0009_alter_route_phone.py new file mode 100644 index 0000000..78d7d6c --- /dev/null +++ b/RoutesApp/migrations/0009_alter_route_phone.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.2 on 2024-11-12 10:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('RoutesApp', '0008_route_highlight_end_dt'), + ] + + operations = [ + migrations.AlterField( + model_name='route', + name='phone', + field=models.CharField(blank=True, null=True, verbose_name='Укажите номер для связи'), + ), + ] diff --git a/RoutesApp/models.py b/RoutesApp/models.py index f9d2051..e1210ad 100644 --- a/RoutesApp/models.py +++ b/RoutesApp/models.py @@ -57,7 +57,7 @@ class Route(BaseModel): verbose_name=_('Куда можете доставить?')) cargo_type = models.CharField(choices=cargo_type_choices, default='parcel', verbose_name=_('Могу перевезти')) weight = models.IntegerField(verbose_name=_('Укажите вес до (кг)')) - phone = models.CharField(verbose_name=_('Укажите номер для связи')) + phone = models.CharField(verbose_name=_('Укажите номер для связи'), blank=True, null=True) extra_phone = models.CharField(verbose_name=_('Дополнительный номер'), blank=True, null=True) receive_msg_by_email = models.BooleanField(default=False, verbose_name=_('Получать уведомления по E-mail')) receive_msg_by_sms = models.BooleanField(default=False, verbose_name=_('Получать уведомления по SMS')) diff --git a/static/js/global_js.js b/static/js/global_js.js index 9d084c5..a018c96 100644 --- a/static/js/global_js.js +++ b/static/js/global_js.js @@ -227,11 +227,11 @@ function checkStateCookie () { if (!window.document.cookie.includes("allow_cookie=true")){ document.querySelector(".cookie_block").classList.add("show") } - if (!window.document.cookie.includes("popup_show=false")){ - setTimeout(() => { - document.querySelector('.popup_wrapper').classList.add('show'); - }, 15000); - } + // if (!window.document.cookie.includes("popup_show=false")){ + // setTimeout(() => { + // document.querySelector('.popup_wrapper').classList.add('show'); + // }, 15000); + // } if(!window.document.cookie.includes("first_authorization=true") && window.document.getElementById('authenticated_img')){ document.querySelector(".popup_wrapper").classList.add("show") } diff --git a/static/js/registration.js b/static/js/registration.js index d35e724..eceb9d5 100644 --- a/static/js/registration.js +++ b/static/js/registration.js @@ -68,7 +68,7 @@ function SendRegistrationForm(el, user_id){ }, error: function (data, exception){ - document.querySelector(".register").innerHTML = data.responseJSON.html + document.querySelector(".register").innerHTML = data.responseText } }); } diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 749c3d4..4236194 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -1308,7 +1308,7 @@ function hideErrors(el) { error_feeedback_text.classList.add('hide') } else if(error_feeedback === footer_button && error_footer !== null ){ error_footer.classList.add('hide') - } else if(el.id === 'agreement_check'){ + } else if(el.id === 'agreement_check' && agree_error !== null){ agree_error.classList.add('hide') } else if(el.id === 'id_arrival_DT' && error_arrival_DT !== null){ error_arrival_DT.classList.add('hide') diff --git a/templates/widgets/routes/w_my_route.html b/templates/widgets/routes/w_my_route.html index 87c5122..99be9f9 100644 --- a/templates/widgets/routes/w_my_route.html +++ b/templates/widgets/routes/w_my_route.html @@ -143,10 +143,10 @@ {% else %}src="{% static "img/svg/user_icon_standart.png" %}"{% endif %}> {{ route.owner.last_name }} {{ route.owner.first_name }} - + - {{ route.phone }} - + {%if route.phone == route.phone %}{{ route.phone }}{% endif %} +
diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index 7439a5a..84af8be 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -105,9 +105,9 @@ {% endif %} - + - {{ route.phone }} + {%if route.phone == route.phone %}{{ route.phone }}{% endif %} {# #}