feat
This commit is contained in:
parent
9704a974e2
commit
5d0e3867ed
@ -4061,7 +4061,7 @@
|
||||
" data = await invitations_collection.find({'prod': PROD,'user_id': user.get('_id')}).sort('_id', -1).to_list()\n",
|
||||
" await notify_collection.update_many({'user_id':user.get('_id'),'type':'invitation'},{\"$set\":{'read':False}})\n",
|
||||
" return templates.TemplateResponse(\n",
|
||||
" request=request, name=\"profile/invitations.html\", context={ \"user\": user, \"data\": data}\n",
|
||||
" request=request, name=\"profile/invitations.html\", context={ \"user\": user, \"data\": data, \"now\": datetime.now()}\n",
|
||||
" )"
|
||||
]
|
||||
},
|
||||
|
||||
2
main.py
2
main.py
@ -3167,7 +3167,7 @@ async def profile_invitation(
|
||||
data = await invitations_collection.find({'prod': PROD,'user_id': user.get('_id')}).sort('_id', -1).to_list()
|
||||
await notify_collection.update_many({'user_id':user.get('_id'),'type':'invitation'},{"$set":{'read':False}})
|
||||
return templates.TemplateResponse(
|
||||
request=request, name="profile/invitations.html", context={ "user": user, "data": data}
|
||||
request=request, name="profile/invitations.html", context={ "user": user, "data": data, "now": datetime.now()}
|
||||
)
|
||||
|
||||
@app.post('/api/social/settings', response_model=dict)
|
||||
|
||||
@ -41,7 +41,8 @@
|
||||
href="{% if doc.get('exhibition') and doc.get('exhibition').get('tizer_link') %}{{doc.get('exhibition').tizer_link}}{% else %}/b/competition/{{ doc.get('exhibition').tizer_file_id }}{% endif %}"
|
||||
style="width: 100%;">Релиз выставки</a>
|
||||
{% endif %}
|
||||
{% if doc.get('accept') == False %}
|
||||
<p class="c_2fr39 b_tfnz2">Принять условия нужно до {{doc.get('exhibition').datetime_start.strftime('%d.%m.%Y')}}</p>
|
||||
{% if doc.get('accept') == False and now < doc.get('exhibition').datetime_start %}
|
||||
<a class="btn" href="/profile/invitation/{{doc._id}}#main" style="width: 100%;">Открыть</a>
|
||||
<!-- <button onclick="accept_inv('{{doc._id}}')" class="btn" href="/profile/delivery#main" style="width: 100%; box-sizing: border-box;">Принять условия</button> -->
|
||||
{% else %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user