New modal to permit admin select user repo for work
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-09-25 19:25:27 +02:00
commit f79c7b43cd
4 changed files with 51 additions and 11 deletions

View file

@ -69,12 +69,15 @@ export class WorkRepository {
}
}
async save() {
async save(user) {
let url = this.id?`repositories/${this.id}`:'repositories';
if (this.id_work) {
url = `works/${this.id_work}/` + url;
}
if (user != null) {
url = `users/${user.id}/` + url;
}
const res = await fetch("api/"+url, {
method: this.id?'PUT':'POST',