New modal to permit admin select user repo for work
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1859a715df
commit
f79c7b43cd
4 changed files with 51 additions and 11 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Reference in a new issue