mirror of https://gitlab.crans.org/bde/nk20
When we credit the note of a club directly, fill the last name and the first name information with the club name instead of empty
This commit is contained in:
parent
4b12e3ed08
commit
c61bb2e90d
|
@ -67,7 +67,11 @@ $(document).ready(function () {
|
||||||
|
|
||||||
last.quantity = 1
|
last.quantity = 1
|
||||||
|
|
||||||
if (!last.note.user) {
|
if (last.note.club) {
|
||||||
|
$('#last_name').val(last.note.name)
|
||||||
|
$('#first_name').val(last.note.name)
|
||||||
|
}
|
||||||
|
else if (!last.note.user) {
|
||||||
$.getJSON('/api/note/note/' + last.note.id + '/?format=json', function (note) {
|
$.getJSON('/api/note/note/' + last.note.id + '/?format=json', function (note) {
|
||||||
last.note.user = note.user
|
last.note.user = note.user
|
||||||
$.getJSON('/api/user/' + last.note.user + '/', function (user) {
|
$.getJSON('/api/user/' + last.note.user + '/', function (user) {
|
||||||
|
|
Loading…
Reference in New Issue