0.0.110 mover, customer buttons

This commit is contained in:
2023-08-28 15:24:25 +03:00
parent 8eaf664de6
commit 05ea2a4076
2 changed files with 11 additions and 4 deletions

View File

@@ -429,7 +429,10 @@ function OnSelectionChange(el) {
function createRoute(el){
function createRoute(el, owner_type){
let obj = {
'owner_type': owner_type
}
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
@@ -440,7 +443,7 @@ function createRoute(el){
processData: false,
contentType: false,
// enctype: 'json',
// data: {},
data: obj,
success: function(data){
if (data.user_alerts) {
getNewMessageSession()

View File

@@ -7,9 +7,13 @@
<img class="svg" src="/static/img/svg/MagnifyingGlass.svg">
<a href="#">Поиск посылки</a>
</div>
<div onclick="createRoute(this)">
<div onclick="createRoute(this, 'customer')">
<img class="svg" src="/static/img/svg/PushPin.svg">
<a href="#">Разместить объявление</a>
<a href="#">Разместить объявление как отправитель</a>
</div>
<div onclick="createRoute(this, 'mover' )">
<img class="svg" src="/static/img/svg/PushPin.svg">
<a href="#">Разместить объявление как перевозчик</a>
</div>
<div onclick="getRoute(this)">
<img class="svg" src="/static/img/svg/Cards.svg">