Info o ilości osób w kolejce

This commit is contained in:
Kuba Orlik 2022-07-15 14:03:20 +02:00
parent c7a9ce6364
commit 630a7fd1ce

View File

@ -68,12 +68,19 @@ export default class ScreenshotRequest {
current_action: string;
preview: string;
}> {
const jobs_ahead = this.getJobsAhead();
return {
url: this.url,
current_action:
this.status == "finished" ? "Zakończono!" : this.current_action,
this.status == "finished"
? "Zakończono!"
: this.status == "waiting"
? `Oczekiwanie w kolejce. Przed Tobą jest ${jobs_ahead} ${
jobs_ahead === 1 ? "osoba" : "osób"
} w kolejce...`
: this.current_action,
domains: this.domains,
jobs_ahead: this.getJobsAhead(),
jobs_ahead,
id: this.id,
status: this.status,
output: this.output,