mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-07-28 06:31:37 +00:00
Merge branch 'public-corpus' of gitlab.ub.uni-bielefeld.de:sfb1288inf/nopaque into public-corpus
This commit is contained in:
@@ -91,7 +91,7 @@ class App {
|
||||
.filter((operation) => {return subRegExp.test(operation.path);});
|
||||
for (let operation of subFilteredPatch) {
|
||||
let [match, userId, jobId] = operation.path.match(subRegExp);
|
||||
this.flash(`[<a href="/jobs/${jobId}">${this.data.users[userId].jobs[jobId].title}</a>] New status: <span class="job-status-text" data-job-status="${operation.value}"></span>`, 'job');
|
||||
this.flash(`[<a href="/jobs/${jobId}">${this.data.users[userId].jobs[jobId].title}</a>] New status: <span class="job-status-text" data-status="${operation.value}"></span>`, 'job');
|
||||
}
|
||||
|
||||
// Apply Patch
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
* Users *
|
||||
* Fetch requests for /users routes *
|
||||
* Settings *
|
||||
* Fetch requests for /settings routes *
|
||||
*****************************************************************************/
|
||||
Requests.settings = {};
|
||||
|
||||
|
15
app/static/js/Requests/users/users.js
Normal file
15
app/static/js/Requests/users/users.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/*****************************************************************************
|
||||
* Users *
|
||||
* Fetch requests for /users routes *
|
||||
*****************************************************************************/
|
||||
Requests.users = {};
|
||||
|
||||
Requests.users.entity = {};
|
||||
|
||||
Requests.settings.entity.delete = (userId) => {
|
||||
let input = `/users/${userId}`;
|
||||
let init = {
|
||||
method: 'DELETE'
|
||||
};
|
||||
return Requests.JSONfetch(input, init);
|
||||
};
|
@@ -12,11 +12,7 @@ class JobInputList extends ResourceList {
|
||||
this.userId = listContainerElement.dataset.userId;
|
||||
this.jobId = listContainerElement.dataset.jobId;
|
||||
if (this.userId === undefined || this.jobId === undefined) {return;}
|
||||
app.subscribeUser(this.userId).then((response) => {
|
||||
app.socket.on('PATCH', (patch) => {
|
||||
if (this.isInitialized) {this.onPatch(patch);}
|
||||
});
|
||||
});
|
||||
app.subscribeUser(this.userId);
|
||||
app.getUser(this.userId).then((user) => {
|
||||
this.add(Object.values(user.jobs[this.jobId].inputs));
|
||||
this.isInitialized = true;
|
||||
|
Reference in New Issue
Block a user